Browse files

Prevented Django from running with an empty secret key. Refs #17800.

This accelerated deprecation schedule was documented in r17617.

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
aaugustin committed Mar 31, 2012
1 parent a1ffb02 commit 9e11ff2665cceeba7b53557f4eeb0689ac71d54a
Showing with 2 additions and 1 deletion.
  1. +2 −1 django/conf/
@@ -12,6 +12,7 @@
import warnings
from django.conf import global_settings
+from django.core.exceptions import ImproperlyConfigured
from django.utils.functional import LazyObject, empty
from django.utils import importlib
@@ -107,7 +108,7 @@ def __init__(self, settings_module):
setattr(self, setting, setting_value)
if not self.SECRET_KEY:
- warnings.warn("The SECRET_KEY setting must not be empty.", DeprecationWarning)
+ raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
if hasattr(time, 'tzset') and self.TIME_ZONE:
# When we can, attempt to validate the timezone. If we can't find

0 comments on commit 9e11ff2

Please sign in to comment.