I exported the path of my django project by
$ export DJANGO_SETTINGS_MODULE=/Users/masi/Documents/Test/djangobook/ch3.settings
I run unsuccessfully
$ django-admin.py runserver Error: Could not import settings '/Users/masi/Documents/Test/djangobook/ch3.settings' (Is it on sys.path? Does it have syntax errors?): Import by filename is not supported.
How can you start Django server without the error message?
$DJANGO_SETTINGS_MODULE should just be set to
ch3.settings. Just make sure that the
ch3 app is in your
For example, if your app is at
/Users/masi/Documents/Test/djangobook/, then set
ch3.settings, and make sure your
$ export PYTHONPATH=/Users/masi/Documents/Test/djangobook/ $ export DJANGO_SETTINGS_MODULE=ch3.settings
The content is written by members of the stackoverflow.com community.
It is licensed under cc-wiki