Created
August 20, 2015 19:31
-
-
Save DarkSector/9e9f7ced00c2dafc84ce to your computer and use it in GitHub Desktop.
Init for the distributed settings
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # for our settings module | |
| import os | |
| ROOT_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) | |
| from base import * # required because that is what we will override | |
| # now first import local and then dev and then prod | |
| if os.path.isfile(os.path.join(ROOT_DIR, 'settings/local.py')): | |
| from local import * | |
| if os.path.isfile(os.path.join(ROOT_DIR, 'settings/dev.py')): | |
| from dev import * | |
| # and then import prod because that has to override all the settings | |
| if os.path.isfile(os.path.join(ROOT_DIR, 'settings/prod.py')): | |
| from prod import * |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment