Created
November 21, 2014 21:46
-
-
Save alexlovelltroy/f5b25cd9bfc886e2a3cc to your computer and use it in GitHub Desktop.
Python settings handling
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
FOO='Barbar' |
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
FOO='bar' | |
try: | |
from local_settings import * | |
print FOO | |
except ImportError: | |
pass |
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
if __name__ == "__main__": | |
import settings | |
print settings.FOO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment