django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but settings are not configured.
Answered
I am new to Django, and I was inherited this Django project from previous developer.
I started using PyCharm for this Django project, and I have encountered this error.
The error message says:
"django.core.exceptions.ImproperlyConfigured: Requested setting DATABASES, but settings are not configured. You must either define environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings."
Thanks in advance.

Please see the attached image file for more details.
Please sign in to leave a comment.
Have you tried to define environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings? Also please attach a screenshot with `Settings| Languages&Frameworks| Django`.
I think the main issue was due to some error on "settings.py" file.
I added something that is not the name of app, but it is name of project.
I tried to add the name under INSTALLED APPS = [ ], but with wrong app name.