Django version 1.8.4
I was going for a django setup similar to one mentioned by "MiniQuark" here for my initial setup...
How to manage local vs production settings in Django?
Here is my project structure:
project
manage.py
- project
settings.py
production.py
development.py
__init__.py
url.py
wsgi.py
My settings file has all main settings, then on "development.py" I have...
from __future__ import absolute_import # optional, but I like it
from .settings import *
# Development overrides
DEBUG = True
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.sqlite3',
'NAME': os.path.join(BASE_DIR, 'db.sqlite3'),
}
}
Then on my "init.py" file(which is ignored by git as mentioned in link)...
from __future__ import absolute_import
from .development import *
# SECURITY WARNING: keep the secret key used in production secret!
SECRET_KEY = '(!z9pvx6vm_wic3(n8*$m0bqer&^2913=1y!776e9b=-&#z'
Is it not possible to do it this way? As it doesn't recognise the secret_key mentioned on the init file?
raise ImproperlyConfigured("The SECRET_KEY setting must not be empty.")