|
David Cooper
david.cooper at compucat.com
Tue Feb 13 21:53:42 EST 2007
Hi Guys,
Firstly thanks for reading - I'm a complete newb to mod_python, having
installed it only yesterday.
I have had some success with the provided examples, however I've got
some troubles with the return value of my handlers being rendered in the
output. The following code renders a 0 on the page, which is not what I
expected?
--- form.html ---
<form action="comment.py/comment" method="POST" >
Comment: <textarea name="comment" rows=4 cols=20></textarea><input
type="submit"><br>
</form>
--- comment.py ---
from mod_python import apache
def comment(req, comment):
return apache.OK
Also, if I return apache.HTTP_NOT_FOUND then I just get a page with 404
rendered at the top.
Question: Why is my return value being interpreted as text to be
rendered, rather than the signal to the mod_python framework whether
everything's ok or not?
Thanks for any assistance!
Cheers, Dave.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mm_cfg_has_not_been_edited_to_set_host_domains/pipermail/mod_python/attachments/20070214/e139e1f2/attachment.html
|