Skip to content

Instantly share code, notes, and snippets.

@benma
Created January 24, 2015 16:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save benma/1d871e7c0ae1a17e09ae to your computer and use it in GitHub Desktop.
Save benma/1d871e7c0ae1a17e09ae to your computer and use it in GitHub Desktop.
external settings verifier
# ....
# in settings.py (oder sonst eine versionierte datei)
import settings_sensitive
class ImproperlyConfigured(Exception):
pass
try:
GIBT_ES = settings_sensitive.GIBT_ES
GIBT_ES_NICHT = settings_sensitive.GIBT_ES_NICHT
except AttributeError, e:
raise ImproperlyConfigured("Missing config variable: %s" % e)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment