Created
July 10, 2011 09:49
-
-
Save hotsyk/1074423 to your computer and use it in GitHub Desktop.
Way to avoid pyflakes error in the settings.py
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
try: | |
import local_settings | |
for param in dir(local_settings): | |
if not '__' in param: | |
setattr(sys.modules[__name__], param,\ | |
getattr(local_settings, param)) | |
except ImportError: | |
pass |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment