I have fecora 11, set django with mod_wsgi2.5 and apache2.2. And I can run "python manage.py runserver" at local. It works fine. I got error when i test from remote browser.
Thanks for any suggestion and help!
I have fecora 11, set django with mod_wsgi2.5 and apache2.2. And I can run "python manage.py runserver" at local. It works fine. I got error when i test from remote browser.
Thanks for any suggestion and help!
Is the application containing your Django project in your $PYTHONPATH
(when Python is invoked in a server context)? For example, if your Django project is at /home/wwwuser/web/myproj
, then /home/wwwuser/web
should be in your $PYTHONPATH
. You should set this in the script that loads the project when invoked from the web server.
Just a guess, but unless you've explicitly made sure that your app is on PYTHONPATH, you should be specifying views in urls.py as myproject.myapp.views.functionname.
Otherwise:
./manage runserver
and make sure they are same./usr/local/django/myapp
, ImportError
may be raised.I just had this problem. It went away when I added sys.path.append('/path/to/project')
to my .wsgi file.