Skip to content

Instantly share code, notes, and snippets.

@doismellburning
Created February 27, 2012 17:21
Show Gist options
  • Save doismellburning/1925616 to your computer and use it in GitHub Desktop.
Save doismellburning/1925616 to your computer and use it in GitHub Desktop.
Django settings for multiple environments
import os
from base import *
deployment = os.getenv("DJANGO_DEPLOYMENT")
#TODO There's probably a nicer way of doing this
if deployment == "live":
from live import *
elif deployment == "staging":
from staging import *
try:
from local import *
except ImportError:
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment