Created
October 24, 2016 19:41
-
-
Save csinchok/e9ca9fad53993ce1f948593d821e4c40 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 sys | |
import importlib | |
class SettingsWrapper: | |
def __init__(self, settings_module=None): | |
settings_module = sys.environ['APP_SETTINGS_MODULE'] | |
self.wrapped = importlib.__import__(settings_module) | |
def __getattribute__(self, key): | |
return getattr(self.wrapped, key) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment