Ticket #17800: 17800.patch

File 17800.patch, 660 bytes (added by aaugustin, 3 years ago)
  • django/conf/__init__.py

     
    106106                    setting_value = (setting_value,) # In case the user forgot the comma.
    107107                setattr(self, setting, setting_value)
    108108
     109        if not self.SECRET_KEY:
     110            raise ValueError("The SECRET_KEY setting mustn't be empty.")
     111
    109112        if hasattr(time, 'tzset') and self.TIME_ZONE:
    110113            # When we can, attempt to validate the timezone. If we can't find
    111114            # this file, no check happens and it's harmless.
Back to Top