Opened 2 years ago
Last modified 2 years ago
#34163 closed Bug
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. — at Initial Version
Reported by: | zic13 | Owned by: | nobody |
---|---|---|---|
Component: | Uncategorized | Version: | 4.1 |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I have tried everything to resolve this issue. Still its not resolving . I did makemigrtions ,migrate user modules are loading . I will add my traceback below for reference.
from adam.common.common import check_database_exists
File "/home/finq/review/106_review/adam/adam/common/common.py", line 9, in <module>
from adam.graphical_user_interface.db_graphical_user_interface.models import UserLogin
File "/home/finq/review/106_review/adam/adam/graphical_user_interface/db_graphical_user_interface/models.py", line 5, in <module>
class UserLogin(models.Model):
File "/home/finq/miniconda3/envs/adam/lib/python3.10/site-packages/django/db/models/base.py", line 127, in new
app_config = apps.get_containing_app_config(module)
File "/home/finq/miniconda3/envs/adam/lib/python3.10/site-packages/django/apps/registry.py", line 260, in get_containing_app_config
self.check_apps_ready()
File "/home/finq/miniconda3/envs/adam/lib/python3.10/site-packages/django/apps/registry.py", line 137, in check_apps_ready
settings.INSTALLED_APPS
File "/home/finq/miniconda3/envs/adam/lib/python3.10/site-packages/django/conf/init.py", line 87, in getattr
self._setup(name)
File "/home/finq/miniconda3/envs/adam/lib/python3.10/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.