django.core.exceptions.ImproperlyConfigured: Requested setting LOGGING_CONFIG, but settings are not configured

前端 未结 8 1331
你的背包
你的背包 2021-02-18 18:07

I\'m trying to run a populate script which I put together from the tango_with_django tutorial (https://github.com/leifos/tango_with_django/blob/master/tango_with_django_project/

8条回答
  •  不知归路
    2021-02-18 18:46

    os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'epl.settings')
    

    should be above

    import django
    

    which is you should call django_settings_module before importing and calling django setup.

    Hope this is helpful.

提交回复
热议问题