mirror of
https://github.com/graphql-python/graphene-django.git
synced 2025-07-13 17:52:19 +03:00
cleanup the code
This commit is contained in:
parent
4f2fb3ebea
commit
76fbcefbc7
|
@ -37,13 +37,19 @@ DEFAULTS = {
|
|||
"RELAY_CONNECTION_MAX_LIMIT": 100,
|
||||
}
|
||||
|
||||
try:
|
||||
|
||||
def init_midleware():
|
||||
if settings.DEBUG:
|
||||
DEFAULTS["MIDDLEWARE"] += ("graphene_django.debug.DjangoDebugMiddleware",)
|
||||
|
||||
|
||||
try:
|
||||
init_midleware()
|
||||
except Exception:
|
||||
if not settings.configured:
|
||||
# configure the settings
|
||||
settings.configure()
|
||||
finally:
|
||||
init_midleware()
|
||||
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user