ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured
Most common cause of this is that you're just running python
instead of using python manage.py shell
, which means you need to manually set the DJANGO_SETTINGS_MODULE
environment variable so Django knows where to find your settings (manage.py shell
does that for you automatically).
It's also possible (but less common) that you have something that's trying to import settings during the process of setting up your settings. To determine if that's the case, look at your settings file for any imports or function calls that might need to access settings (including code in things being imported by your settings file).
try this in your xx.py
from youprojectName.wsgi import *
Run python manage.py shell
instead of running python
to reach environment shell in your project. Python
does not simply recognize django
installed apps by default.