[mod_python] Some problems with mod_python.publisher

Mark Smith mark at camazotz.com
Mon Jun 16 08:54:20 EST 2003


Michel Thadeu <michel_ts at yahoo.com.br> wrote:
>    def executar(req):
>            req.content_type="text/html"
>            req.send_http_header()
>            req.write('<H1>Some test of executar!</H1>')
>            return apache.OK

The publisher handler expects your handler to return the page body 
rather than the status.

   def executar(req):
     return '<H1>Some test of executar!<H1>'

You can still use req.write() if you prefer; in that case, use

   return ''

at the end.



More information about the Mod_python mailing list