I have 3 settings files:
- base.py (shared)
- development.py
- production.py
base.py has:
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes'
...
but I have some apps that I only want in my development environment, for example, debug-toolbar
.
I tried this in development.py:
INSTALLED_APPS += (
'debug_toolbar',
)
But get the error: NameError: name 'INSTALLED_APPS' is not defined
The settings files are connected like this:
__init__.py
from .base import *
try:
from .production import *
except:
from .development import *
How can I differentiate the installed apps between my production/development environment?
DJANGO_SETTINGS_MODULE=project_name.settings.production
and in the production.pyfrom .base import *
and override any setting that need to be changed. – Mullen