Skip to content

Instantly share code, notes, and snippets.

@alexlovelltroy
Created November 21, 2014 21:46
Show Gist options
  • Save alexlovelltroy/f5b25cd9bfc886e2a3cc to your computer and use it in GitHub Desktop.
Save alexlovelltroy/f5b25cd9bfc886e2a3cc to your computer and use it in GitHub Desktop.
Python settings handling
FOO='bar'
try:
from local_settings import *
print FOO
except ImportError:
pass
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