mirror of
https://github.com/zulip/zulip.git
synced 2025-11-05 22:43:42 +00:00
Add logging filter for checking that the app is actually deployed
(imported from commit 77bd7e008fdea4033e18a91d206999f9714e0f74)
This commit is contained in:
@@ -45,3 +45,8 @@ class EmailLimiter(_RateLimitFilter):
|
||||
class ReturnTrue(logging.Filter):
|
||||
def filter(self, record):
|
||||
return True
|
||||
|
||||
class RequireReallyDeployed(logging.Filter):
|
||||
def filter(self, record):
|
||||
from django.conf import settings
|
||||
return settings.DEPLOYED and not settings.TESTING_DEPLOYED
|
||||
|
||||
Reference in New Issue
Block a user