1
0
mirror of https://github.com/django/django.git synced 2024-12-23 09:36:06 +00:00

Actually warn on empty SECRET_KEY instead of raising a warning as an exception.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@17745 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Carl Meyer 2012-03-15 16:50:29 +00:00
parent b018128ea5
commit e41fcdd4d9

View File

@ -107,7 +107,7 @@ class Settings(BaseSettings):
setattr(self, setting, setting_value) setattr(self, setting, setting_value)
if not self.SECRET_KEY: if not self.SECRET_KEY:
raise DeprecationWarning("The SECRET_KEY setting must not be empty.") warnings.warn("The SECRET_KEY setting must not be empty.", DeprecationWarning)
if hasattr(time, 'tzset') and self.TIME_ZONE: if hasattr(time, 'tzset') and self.TIME_ZONE:
# When we can, attempt to validate the timezone. If we can't find # When we can, attempt to validate the timezone. If we can't find