Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#19428 closed Bug (worksforme)

Django 1.5b1 raises "The SECRET_KEY setting must not be empty." even if it is set in an imported file

Reported by: nick@… Owned by: nobody
Component: Uncategorized Version: 1.5-beta-1
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no


My SECRET_KEY lives in a file called that is imported on the first line of at the various stages of development using:

from settings_common import * then contains DATABASES and DEBUG settings only. This worked fine in Django 1.4 however Django 1.5b1 is saying that SECRET_KEY is not set even though it is.

I have added

print self.SECRET_KEY

statements around the SECRET_KEY checker in django/conf/ and if the ImproperlyConfigured exception is commented out they display the key properly. However if the exception is allowed to raise, they appear blank.

Change History (2)

comment:1 Changed 8 years ago by Carl Meyer

Resolution: worksforme
Status: newclosed

Thanks for the report!

I can't reproduce this issue using the setup you describe (unless the SECRET_KEY value in the file is in fact the empty string, in which case the error is correct).

If you reopen, please attach a set of project files that cause the problem for you, preferably stripped down to the simplest case.

comment:2 Changed 8 years ago by anonymous

My apologies, turned out it was THUMBNAIL_PROCESSORS for easy_thumbnails' settings import that doesn't have SECRET_KEY set.


Note: See TracTickets for help on using tickets.
Back to Top