Skip to content

Instantly share code, notes, and snippets.

@sobolevn
Created July 25, 2016 07:44
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 sobolevn/006c734f0520439a4b6c16891d65406c to your computer and use it in GitHub Desktop.
Save sobolevn/006c734f0520439a4b6c16891d65406c to your computer and use it in GitHub Desktop.
# -*- coding: utf-8 -*-
from split_settings.tools import optional, include
from components import CONFIG
# To change settings file: runserver --settings=bitcoins.other_settings
if CONFIG['DJANGO_SETTINGS_MODULE'] == 'bitcoins.settings':
testing = bool(CONFIG['_DJANGO_TESTING'])
base_settings = [
'components/common.py',
'components/constants.py',
'components/queues.py',
]
if not testing:
settings = base_settings + [
'environments/production.py',
optional('environments/development.py'),
]
else:
settings = base_settings + [
'environments/testing.py',
]
# Include settings for the current env:
include(*settings, scope=globals())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment