Hi treelife,

On Thursday 16 February 2006 06:27, treelife wrote:
> I need to run Django, but can't get past mod_python.  I'm getting and
> internal server error when | run the following mod_python script.
> Script:
>
> from mod_python import apache
>
> def handler(req):
>     req.content_type = 'text/plain'
>     req.write("Under Construction")
>     return apache.OK

I didn't see the "internal server error" in your relevant info.  I didn't 
spend that much time looking, though.  You may need to 
"req.send_http_header()" before you "req.write()", though.


> Here is some other relevant info.  Hope this is not too much:
>
> Debian 3.x/python2.3.5/mod_python3.1.3/Apache2.0.54
>
> from the command line test:
> >>> import  mod_python.psp
>
> Traceback ( most recent call last ):
>    File "<stdin>", line 1,in ?
>   File "/usr/lib/python2.3/site-packages/mod_python/psp.py",line20, in
> ?
> import apache,Session,util,-psp
>
> File "/usr/lib/python2.3/site-packages/mod_python/apache.py,line28,in ?
> import _apache
>
> ImportError: No Module named _apache


This looks like a mod_python faq:
<http://www.modpython.org/FAQ/faqw.py?req=show&file=faq02.002.htp>


There's lot's of good mod_python documentation out there, including how to get 
started with the basics, like your handler method above.  Use google to find 
it ;)


Eric.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to