fixed settings

This commit is contained in:
MardanovTimur 2019-05-21 14:39:06 +03:00
parent 02d7090d6f
commit a4949abe58

View File

@ -37,13 +37,15 @@ DEFAULTS = {
"RELAY_CONNECTION_MAX_LIMIT": 100, "RELAY_CONNECTION_MAX_LIMIT": 100,
} }
try:
if settings.DEBUG:
DEFAULTS["MIDDLEWARE"] += ("graphene_django.debug.DjangoDebugMiddleware",)
except Exception:
if not settings.configured:
# configure the settings
settings.configure()
if not settings.configured:
# configure the settings
settings.configure()
if settings.DEBUG:
DEFAULTS["MIDDLEWARE"] += ("graphene_django.debug.DjangoDebugMiddleware",)
# List of settings that may be in string import notation. # List of settings that may be in string import notation.
IMPORT_STRINGS = ("MIDDLEWARE", "SCHEMA") IMPORT_STRINGS = ("MIDDLEWARE", "SCHEMA")