当前位置: 代码迷 >> 综合 >> Requested setting LOGGING_CONFIG, but settings are not configured
  详细解决方案

Requested setting LOGGING_CONFIG, but settings are not configured

热度:70   发布时间:2023-12-17 06:43:45.0
测试运行python文件异常现象django.core.exceptions.ImproperlyConfigured: Requested setting LOGGING_CONFIG, but settings are not configured. You must
either define the environment variable DJANGO_SETTINGS_MODULE or call settings.configure() before accessing settings.解决方法:from django.conf import settings settings.configure(DEBUG=True)测试运行服务出现WARNINGS:提示 1:URL namespace 'djdt' isn't unique. You may not be able to reverse all URLs in this namespace在对应的URL.py文件中添加 app_name = ''
  相关解决方案