Commit 1c9e49796f72f371673806596bfe164a73c8d88f
1 parent
8b15acf3
odsiewanie błędów DisallowedHost, żeby nie spamować
Showing
1 changed file
with
9 additions
and
1 deletions
settings.py
... | ... | @@ -161,9 +161,17 @@ LOGGING = { |
161 | 161 | 'filters': ['require_debug_false'], |
162 | 162 | 'class': 'django.utils.log.AdminEmailHandler', |
163 | 163 | 'include_html': True, |
164 | - } | |
164 | + }, | |
165 | + 'null': { | |
166 | + 'level': 'DEBUG', | |
167 | + 'class': 'logging.NullHandler', | |
168 | + }, | |
165 | 169 | }, |
166 | 170 | 'loggers': { |
171 | + 'django.security.DisallowedHost': { | |
172 | + 'handlers': ['null'], | |
173 | + 'propagate': False, | |
174 | + }, | |
167 | 175 | 'django.request': { |
168 | 176 | 'handlers': ['mail_admins'], |
169 | 177 | 'level': 'ERROR', |
... | ... |