Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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

This accelerated deprecation schedule was documented in r17617.


git-svn-id: http://code.djangoproject.com/svn/django/trunk@17836 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 9e11ff2665cceeba7b53557f4eeb0689ac71d54a 1 parent a1ffb02
Aymeric Augustin authored

Showing 1 changed file with 2 additions and 1 deletion. Show diff stats Hide diff stats

  1. 3  django/conf/__init__.py
3  django/conf/__init__.py
@@ -12,6 +12,7 @@
12 12
 import warnings
13 13
 
14 14
 from django.conf import global_settings
  15
+from django.core.exceptions import ImproperlyConfigured
15 16
 from django.utils.functional import LazyObject, empty
16 17
 from django.utils import importlib
17 18
 
@@ -107,7 +108,7 @@ def __init__(self, settings_module):
107 108
                 setattr(self, setting, setting_value)
108 109
 
109 110
         if not self.SECRET_KEY:
110  
-            warnings.warn("The SECRET_KEY setting must not be empty.", DeprecationWarning)
  111
+            raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")
111 112
 
112 113
         if hasattr(time, 'tzset') and self.TIME_ZONE:
113 114
             # When we can, attempt to validate the timezone. If we can't find

0 notes on commit 9e11ff2

Please sign in to comment.
Something went wrong with that request. Please try again.