[mod_python] Problem with Mod Python Appending HTML

Max Luebbe max.luebbe at gmail.com
Wed Jun 28 16:41:25 EDT 2006

I am having problems with my mod_python scripts appending HTML together,
when having req.write() create a new page is what I am after.

I have an authentication handler for a blank html page that queries a
database for a user/pass, and then generates HTML based off of who
logged in.

The HTML generated is a form, and the user information is used to
populate the default values. When the user submits the form, and my
formHandler is called, the HTML it generates is appended to the current
page, instead of starting a new one. I have <html> and </html> tags at
the appropriate places to mark where documents are starting and

I did not have this problem on any of the other pages/scripts I have
written, and I think that adding authentication into the mix is the
variable in the equation.

What I am after is the following sequence:
(1) user login 
(2) new page w/form with default fields grabbed from db (generated html)
(3) another new page w/confirmation info (values and corrections from
form) (generated html)

Any suggestions?
I would greatly appreciate any help I could get.

Max Luebbe <max.luebbe at gmail.com>

More information about the Mod_python mailing list