xenith/django-base-template

Following readme's directions, SECRET_KEY error from settings/base.py

Closed this issue · 1 comments

The get_env_setting example from settings/base.py means that anyone following the "How to use" will hit an error unless they also edit base.py or set SECRET_KEY in their environment.

Maybe a short mention of this in the "How to use" section? Also needed to change line 17 to: "return os.environ.get(setting)" to get it working.

I commented it out with a note on how to use it. You can leave it uncommented for development, then when you move it into production you can uncomment it, or move the definition into local.py. (However you like to do your deployments)

I left it as os.environ[setting], since the entire point of the function is to raise an exception if the variable isn't set.