Hello,
I'm working through the "Shorty" tutorial, works well so far. I can
start the server with "python manage.py runserver" and http://localhost:5000
works fine in the browser.
Now I want to serve the page through apache with mod_wsgi. A "Hello
World!" WSGI example works, but not the Shorty application. Could
somebody please point me in the right direction?
$ export PYTHONPATH=${PYTHONPATH}:/var/www/shorty/
$ cat /var/www/shorty/shorty.wsgi
from shorty.application import Shorty
application = Shorty('sqlite:////tmp/shorty.db')
$ tail /var/log/apache2/error.log
[Sun Jul 19 21:48:07 2009] [error] [client 10.0.0.11] mod_wsgi
(pid=23422): Target WSGI script '/var/www/shorty/shorty.wsgi' cannot
be loaded as Python module.
[Sun Jul 19 21:48:07 2009] [error] [client 10.0.0.11] mod_wsgi
(pid=23422): Exception occurred processing WSGI script '/var/www/
shorty/shorty.wsgi'.
[Sun Jul 19 21:48:07 2009] [error] [client 10.0.0.11] Traceback (most
recent call last):
[Sun Jul 19 21:48:07 2009] [error] [client 10.0.0.11] File "/var/www/
shorty/shorty.wsgi", line 1, in <module>
[Sun Jul 19 21:48:07 2009] [error] [client 10.0.0.11] from
shorty.application import Shorty
[Sun Jul 19 21:48:07 2009] [error] [client 10.0.0.11] ImportError: No
module named shorty.application
$ pwd
/var/www/shorty
$ ls ./*
./manage.py ./shorty.wsgi
./shorty:
application.py __init__.py models.py static utils.py
views.py
application.pyc __init__.pyc models.pyc templates utils.pyc
views.pyc
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"pocoo-libs" 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/pocoo-libs?hl=en
-~----------~----~----~----~------~----~------~--~---