Commit 070d482f authored by Christos Stavrakakis's avatar Christos Stavrakakis
Browse files

webproject: Move patching of hidden settings

Remove patching of 'django.views.debug.HIDDEN_SETTINGS'  from 'cleanse'
middleware that is going to be totally removed. Instead, patch them in
'' of webproject.
parent 60042529
......@@ -35,9 +35,6 @@ from django.conf import settings
from django.core.exceptions import MiddlewareNotUsed
from django.core import mail
from django.views import debug
import re
......@@ -98,8 +95,6 @@ class CleanseSettingsMiddleware(object):
def __init__(self):
debug.HIDDEN_SETTINGS = re.compile(settings.HIDDEN_SETTINGS)
if not hasattr(mail, 'mail_admins_plain'):
mail.mail_admins_plain = mail.mail_admins
mail.mail_admins = mail_admins_safe
# Patch hard-coded 'django.views.debug.HIDDEN_SETTINGS' to the list of Synnefo
import re
from django.views import debug
from django.conf import settings
debug.HIDDEN_SETTINGS = re.compile(settings.HIDDEN_SETTINGS)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment