0
我想在Heroku上設置一個Django站點。我得到這個錯誤信息:Heroku sais:「請求的設置LOGGING_CONFIG」,但它被設置?
2017-10-07T21:03:33.416585+00:00 app[web.1]:
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.
但是,如果我運行Heroku配置,var被設置。爲什麼不認可?
=== dagenssalg Config Vars
DISABLE_COLLECTSTATIC: 0
LOGGING_CONFIG: off
在這裏的許多答案提wsgi.py文件,但我看不出什麼錯:
import os
from django.core.wsgi import get_wsgi_application
from django.core.wsgi import get_wsgi_application
from whitenoise.django import DjangoWhiteNoise
application = get_wsgi_application()
application = DjangoWhiteNoise(application)
os.environ.setdefault("DJANGO_SETTINGS_MODULE","dagenssalg.settings")
application = get_wsgi_application()
任何幫助最讚賞。最好的問候Kresten
謝謝!我今晚會嘗試這個 – Kresten