I have setup a Django project on my laptop and build my first app. I have setup all the necessary software on a second server and I want to migrate my project to that one.
After uploading my files, I have tried a couple of things, but I still get errors like:
ImportError at /
No module named myapp.models
Request Method: GET
Django Version: 1.3.1
Exception Type: ImportError
Exception Value:
No module named myapp.models
Exception Location: /var/www/wsgi/myproject/myapp/admin.py in <module>, line 2
Python Executable: /usr/bin/python
Python Version: 2.6.5
The problematic line on admin.py looks like:
from myapp.models import (...)
and file models.py in this app has the necessary stuff, so I guess it can’t resolve the app namespace or something?
It seems your
PYTHONPATHdoesn’t include/var/www/wsgi/myproject. Can you show your WSGI config file?