Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Move impersonate settings to dict

Pacu26a3bdc8ea33e
diff --git a/saleor/settings.py b/saleor/settings.py
index 8f8bd3fdbc..7e02478464 100644
--- a/saleor/settings.py
+++ b/saleor/settings.py
@@ -419,8 +419,9 @@ CELERY_RESULT_SERIALIZER = 'json'
CELERY_RESULT_BACKEND = 'django-db'
# Impersonate module settings
-IMPERSONATE_URI_EXCLUSIONS = [r'^dashboard/']
-IMPERSONATE_CUSTOM_USER_QUERYSET = \
- 'saleor.userprofile.impersonate.get_impersonatable_users'
-IMPERSONATE_USE_HTTP_REFERER = True
-IMPERSONATE_CUSTOM_ALLOW = 'saleor.userprofile.impersonate.can_impersonate'
+IMPERSONATE = {
+ 'URI_EXCLUSIONS': [r'^dashboard/'],
+ 'CUSTOM_USER_QUERYSET': 'saleor.userprofile.impersonate.get_impersonatable_users', # noqa
+ 'USE_HTTP_REFERER': True,
+ 'CUSTOM_ALLOW': 'saleor.userprofile.impersonate.can_impersonate'
+}