HTML generation vs PSP vs Templating Engines
thakadu
thakadu at gmail.com
Wed Nov 16 18:09:46 EST 2005
I just do the following:
I store the form data as a pickeled dictionary. Then I create my
HTML form with something like this:
HTMLout="""<HTML><BODY>......
......
<INPUT NAME="field1" value=%(field1)s>
<INPUT NAME="field2" value=%(field2)s>
<INPUT NAME="field3" value=%(field3)s>'''
where the field1, field2 etc era the fields on my form.
Then finally:
print HTMLout % dict
where dict has all the values that I previously pickled.
You have to do some additional trickery for <SELECT> type fields
and checkboxes and so on but its really not difficult.
More information about the Python-list
mailing list