I got this error while solving some issues in my project
Traceback (most recent call last):
File "C:\Users\hp\Downloads\examination-project-repo\Online-Examination-System-CUH-2024\admin\files.py", line 1, in <module>
from rest_framework.authtoken.models import Token
File "C:\Users\hp\Downloads\examination-project-repo\Online-Examination-System-CUH-2024\.venv\Lib\site-packages\rest_framework\authtoken\models.py", line 9, in <module>
class Token(models.Model):
File "C:\Users\hp\Downloads\examination-project-repo\Online-Examination-System-CUH-2024\.venv\Lib\site-packages\rest_framework\authtoken\models.py", line 15, in Token
settings.AUTH_USER_MODEL, related_name='auth_token',
^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\hp\Downloads\examination-project-repo\Online-Examination-System-CUH-2024\.venv\Lib\site-packages\django\conf\__init__.py", line 81, in __getattr__
self._setup(name)
File "C:\Users\hp\Downloads\examination-project-repo\Online-Examination-System-CUH-2024\.venv\Lib\site-packages\django\conf\__init__.py", line 61, in _setup
raise ImproperlyConfigured(
django.core.exceptions.ImproperlyConfigured: Requested setting AUTH_USER_MODEL, but settings are not configured. You must either define the environment variable DJANGO_SETTINGS_MODULE
or call settings.configure() before accessing settings.
Вернуться на верх