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?
Your
$DJANGO_SETTINGS_MODULEshould just be set toch3.settings. Just make sure that thech3app is in your$PYTHONPATH, too.For example, if your app is at
/Users/masi/Documents/Test/djangobook/, then set$DJANGO_SETTINGS_MODULEtoch3.settings, and make sure your$PYTHONPATHincludes/Users/masi/Documents/Test/djangobook.