Skip to content

Instantly share code, notes, and snippets.

@greylurk
Created June 15, 2012 21:56
Show Gist options
  • Save greylurk/2938900 to your computer and use it in GitHub Desktop.
Save greylurk/2938900 to your computer and use it in GitHub Desktop.
# Most normal settings
DEFAULT_FILE_STORAGE = 'django.core.files.storage.FileSystemStorage'
STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.StaticFilesStorage'
try:
execfile(os.path.join("/etc/project", "settings_local.py"))
except IOError:
execfile(os.path.join(SITE_ROOT, 'settings_local.py'))
SITE_ID=1
DATABASE = {
.....
}
SITE_ID=3
DATABASE = {
.....
}
SITE_ID=2
DATABASE = {
.....
}
@greylurk
Copy link
Author

And in production, we copy settings_local.production.py to /etc/project, In staging, settings_loca.staging.py to /etc/project, and so on.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment