Created
September 25, 2019 18:21
-
-
Save brunomichetti/bcfdc18f03deada64d7d0ed07be6e4c7 to your computer and use it in GitHub Desktop.
This file contains 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
import os | |
import importlib | |
# by default use development | |
ENV_ROLE = os.getenv('ENV_ROLE', 'development') | |
env_settings = importlib.import_module(f'example_project.settings.{ENV_ROLE}') | |
globals().update(vars(env_settings)) | |
try: | |
# import local settings if present | |
from .local import * # noqa | |
except ImportError: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment