I have 3 settings files:
- base.py (general)
- development.py
- production.py
base.py has:
INSTALLED_APPS = (
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes'
...
but I have some applications that I only needed my development environment, for example debug-toolbar.
I tried this in development.py:
INSTALLED_APPS += (
'debug_toolbar',
)
But we get the error: NameError: name 'INSTALLED_APPS' is not defined
Settings files are connected as follows:
__init__.py
from .base import *
try:
from .production import *
except:
from .development import *
How can I distinguish installed applications between my development / development environment?
source
share