Запускаю тесты, программа просит сослаться на настройки и окружение, а что конкретно, понять не могу. Текст ошибки приложен ниже
test setup failed cls = <class 'store.tests.test_logic.LogicTestCase'>
@classmethod
def setUpClass(cls):
super().setUpClass()
...(тут были ссылки на основной код Django)
self = <LazySettings [Unevaluated]>, name = 'DATABASES'
def _setup(self, name=None):
"""
Load the settings module pointed to by the environment variable. This
is used the first time settings are needed, if the user hasn't
configured settings manually.
"""
settings_module = os.environ.get(ENVIRONMENT_VARIABLE)
if not settings_module:
desc = ("setting %s" % name) if name else "settings"
raise ImproperlyConfigured(
"Requested %s, but settings are not configured. "
"You must either define the environment variable %s "
"or call settings.configure() before accessing settings."
% (desc, ENVIRONMENT_VARIABLE)
)
E 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.
Источник: Stack Overflow на русском