Django: "Could not import settings 'blog.settings'"
I'm new to Django. I was getting this error:
django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES,
but settings are not configured. You must either define the environment
variable DJANGO_SETTINGS_MODULE or call settings.configure() before
accessing settings.
I decided to define the DJANGO_SETTINGS_MODULE environment variable.
(My project location: C:\DjangoProjects\blog)
I added C:\DjangoProjects (parent folder of the project) to the
PYTHONPATH. In my DJANGO_SETTINGS_MODULE environment variable I have
blog.settings.
Now I'm getting the following error:
ImportError: Could not import settings 'blog.settings' (Is it on
sys.path?): No module named blog.settings
The settings file has no errors.
What's wrong with this?
No comments:
Post a Comment