Mod_Python - How to make Publisher Handler work?

Discussion in 'Python' started by Nancy, Jul 18, 2004.

  1. Nancy

    Nancy Guest

    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?
    Who knows where I can get a more basic and simple tutorial about
    mod_python?
    Thanks a lot

    Nancy
     
    Nancy, Jul 18, 2004
    #1
    1. Advertising

  2. Nancy

    Doug Holton Guest

    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/
     
    Doug Holton, Jul 18, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Anthony Raj
    Replies:
    0
    Views:
    398
    Anthony Raj
    Jun 18, 2004
  2. charlie knudsen

    mod_python 2.7.10 - publisher

    charlie knudsen, Nov 27, 2004, in forum: Python
    Replies:
    1
    Views:
    470
    charliek
    Nov 28, 2004
  3. Python_it
    Replies:
    0
    Views:
    499
    Python_it
    Oct 12, 2005
  4. exhuma.twn
    Replies:
    3
    Views:
    342
    exhuma.twn
    Mar 20, 2006
  5. yaru22
    Replies:
    1
    Views:
    347
    Steve Holden
    Sep 4, 2006
Loading...

Share This Page