Skip to content

Commit 85e8e2c

Browse files
authored
Add escape hatch to be able to disable zeal (#2995)
1 parent 2b00d1d commit 85e8e2c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

main/settings.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,9 +352,12 @@
352352
"oauth2_provider.middleware.OAuth2TokenMiddleware",
353353
"django_scim.middleware.SCIMAuthCheckMiddleware",
354354
)
355+
ZEAL_ENABLE = get_bool(
356+
name="ZEAL_ENABLE", default=False, description="Whether to enable zeal or not"
357+
)
355358

356359
# enable the zeal nplusone profiler only in debug mode or under pytest
357-
if DEBUG or ENVIRONMENT == "pytest":
360+
if ZEAL_ENABLE or ENVIRONMENT == "pytest":
358361
INSTALLED_APPS += ("zeal",)
359362
# this should be the first middleware so we catch any issues in our own middleware
360363
MIDDLEWARE += ("zeal.middleware.zeal_middleware",)

0 commit comments

Comments
 (0)