redirecting to a content page

Shreyas shreyasv at gmail.com
Tue Feb 21 18:44:42 EST 2006


I am a new user writing some scripts to store data entered via a
browser into a database.  I have several content pages, and one
"processing" page.  A content page often has a form like this:

<form method=POST action=processing.py>
<input type=text name=username>
...

And the processing page goes like this:

form = cgi.FieldStorage()
## do some work, put data into the db

The thing is, processing.py doesn't have any content that I want to
display to the user.  I would ideally like processing.py to seamlessly
send the user back to the content page that it came from, perhaps with
some parameter tweaks.

Instead, I am having to write intermediate steps like this into
processing.py:

Return to the <a href=contentPage.py?submit=true>page</a> you came
from.

Please let me know if there's a way to do this, or if my general
approach (having such a processing page) is off.

Thanks,

Shreyas

- I did try searching for this in the archive but am not even entirely
sure what it is called...




More information about the Python-list mailing list