Python, Forms, Databases
Tim Parkin
tim at pollenation.net
Wed Feb 15 15:17:33 EST 2006
Xavier Morel wrote:
> Tempo wrote:
>
>>Larry I do see your point. There does seem to be a lot more support for
>>PHP and MySQL together than there is Python and ASP. But I want to
>>first try to accomplish my goal by using Python first before I give up
>>and revert back to PHP. So if I was going to parse HTML forms and place
>>the data into a MySQL database, what should I use? CGI module? Zope?
>>Webware? Thanks for any and all help.
>>
>
> If you're talking about a pair of page and nothing more, the CGI module
> and manually handling your stuff (with a DBAPI2 MySQL module for the DB
> link) is more than enough.
>
> If you want to create something more complex (a full database driven
> website), it would probably be a good idea to check some of Python's web
> frameworks, Django for example.
Simple cgi example
http://www.ibiblio.org/obp/pyBiblio/tips/wilson/basiccgi.php
or you can go the more complex route which generates, validates and
parses forms for you.
http://divmod.org/trac/wiki/DivmodNevow/FormHandling
for which you'll need twisted sumo and pollenations forms package
Here is some sample code:
http://divmod.org/trac/attachment/wiki/DivmodNevow/FormHandling/Example1.2.tac.py
Tim Parkin
More information about the Python-list
mailing list