Skip to content
This repository has been archived by the owner on Nov 30, 2021. It is now read-only.

Commit

Permalink
add dynamic confd settings lookup (with local_settings override)
Browse files Browse the repository at this point in the history
  • Loading branch information
Gabriel Monroy committed Feb 12, 2014
1 parent f5312c5 commit 98296b7
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions deis/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

from __future__ import unicode_literals
import os.path
import sys
import tempfile

PROJECT_ROOT = os.path.normpath(os.path.join(os.path.dirname(__file__), '..'))
Expand Down Expand Up @@ -305,6 +306,14 @@
# see https://docs.djangoproject.com/en/1.5/ref/settings/#std:setting-ALLOWED_HOSTS
ALLOWED_HOSTS = ['*']

# import dynamic confd settings from /app, if they exist
try:
if os.path.exists('/app/confd_settings.py'):
sys.path.append('/app')
from confd_settings import *
except ImportError:
pass

# Create a file named "local_settings.py" to contain sensitive settings data
# such as database configuration, admin email, or passwords and keys. It
# should also be used for any settings which differ between development
Expand Down

0 comments on commit 98296b7

Please sign in to comment.