'Improperly configured error says I'll have to define env variable DJANGO_SETTINGS_Module .Please help me solving this problem [closed]
So I m just a newbie trying to learn django .. i was just trying to copy what Harry did(a youtuber who teaches code) but I got stuck right after creating the project file, the url.py file of my project keep showing me the error (django.core.exception. improperly configured request settings INSTALLED APP but settings are not config. You must either define the DJANGO_SETTINGS_MODULE or call setting config() before accessing settings.)I tried doing everything I could with the help of Google and YouTube but still not able to solve it . Can someone help me with this
And it's on a mobile ide named pydroid 3.
BELOW IS THE ERROR I M GETTING
Traceback (most recent call last): File "/data/user/0/ru.iiec.pydroid3/files/accomp_files/iiec_run/iiec_run.py", line 31, in start(fakepyfile,mainpyfile) File "/data/user/0/ru.iiec.pydroid3/files/accomp_files/iiec_run/iiec_run.py", line 30, in start exec(open(mainpyfile).read(), main.dict) File "", line 20, in File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/site-packages/django/utils/functional.py", line 258, in inner self._setup() File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/site-packages/django/contrib/admin/sites.py", line 596, in _setup AdminSiteClass = import_string(apps.get_app_config("admin").default_site) File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/site-packages/django/apps/registry.py", line 156, in get_app_config self.check_apps_ready() File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/site-packages/django/apps/registry.py", line 137, in check_apps_ready settings.INSTALLED_APPS File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/site-packages/django/conf/init.py", line 87, in getattr self._setup(name) File "/data/user/0/ru.iiec.pydroid3/files/aarch64-linux-android/lib/python3.9/site-packages/django/conf/init.py", line 67, in _setup raise ImproperlyConfigured( django.core.exceptions.ImproperlyConfigured: Requested setting INSTALLED_APPS, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.
[Program finished]
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
