Add logging filter for checking that the app is actually deployed

(imported from commit 77bd7e008fdea4033e18a91d206999f9714e0f74)
This commit is contained in:
Zev Benjamin 2013-06-10 12:57:59 -04:00
parent e6a98dabce
commit 03b40d180c
1 changed files with 5 additions and 0 deletions

View File

@ -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