You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jan 8, 2019. It is now read-only.
from .base import *
try:
from .local import *
except ImportError, exc:
exc.args = tuple(['%s (did you rename settings/local.py-dist?)' % exc.args[0]])
raise exc
will cause problems anytime you try to specify another settings module. E.g. if you set DJANGO_SETTINGS_MODULE=projectname.settings.staging, then in the course of loading the projectname.settings.staging module, Python will load projectname/settings/init.py, and suddenly unexpected and probably unwanted settings modules are being loaded.
An alternative that seems to work better is to move this code into projectname/settings/default.py and make the default settings module point to that. Then if someone overrides the settings module, the default code never gets loaded.