Mod_Python - How to make Publisher Handler work?

Doug Holton insert at spam.here
Sun Jul 18 12:16:52 EDT 2004


Nancy wrote:
> Hi,
>   I follow the Mod_python manual and try to let my form.py to handle
> html form. The form.html and form.py are copied from
> http://www.modpython.org/live/current/doc-html/tut-pub.html,
> after I click "submit", it always calls the page of 'Hello World',
> that is myscript.py:
>   from mod_python import apache
> 
>   def handler(req):
>     req.write("Hello World!")
>     return apache.OK
> 
>   Where is wrong?

You need to make sure you have added mod_python.publisher to your 
httpd.conf or .htaccess like the tutorial page says, and if you have 
already, try restarting apache.  If it still gives the error, then 
remove the old myscript stuff from your httpd.conf or .htaccess and 
restart apache again. (really you only need to restart if you change 
httpd.conf, not .htaccess)

 >   Who knows where I can get a more basic and simple tutorial about
 > mod_python?
 >   Thanks a lot

I don't know of a good tutorial for mod_python, but here are a few 
additional resources: http://modpython.coedit.net/



More information about the Python-list mailing list