4👍
You need to make sure that the project is in your PYTHONPATH
. Maybe try to output the sys.path
variable at the top of your settings file:
import sys
print sys.path
If this doesn’t work with mod_python
try to write it to a file:
import sys
file('/tmp/mysyspath.txt', 'w').write(repr(sys.path))
But even if that will work, here is a short warning:
It’s discouraged in the django community to use mod_python
. It’s no longer maintained by its creators and was never the best solution to deploy your django project. Please try mod_wsgi
if its available for you on your server.
- Django: Remove "view on site" button in the admin User change form
- Is a ModelChoiceField always required?
0👍
Normally the project directory is added to sys.path
and then the app name is used directly in INSTALLED_APPS
and in imports in other apps. Give this a try.
- Django 1.7 blank CharField/TextField convention
- Django: I get a [relation "auth_group" does not exist] error after syncdb
- Django-rest-framework: add additional permission in ViewSet update method
Source:stackexchange.com