From 58d6eab80348a072e6a17d571f0079f7da9dcb05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Wed, 19 Aug 2015 12:29:23 +0200 Subject: [PATCH] add support for a local_settings.py file --- .gitignore | 1 + eobuilder/settings.py | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/.gitignore b/.gitignore index bf625e4..baa985d 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ *.orig *.pyc *.pyo +local_settings.py diff --git a/eobuilder/settings.py b/eobuilder/settings.py index 0a799ee..683c64f 100644 --- a/eobuilder/settings.py +++ b/eobuilder/settings.py @@ -1,3 +1,6 @@ +import os + +BASE_DIR = os.path.dirname(os.path.dirname(__file__)) GIT_PATH = "/var/lib/eobuilder/git" ORIGIN_PATH = "/var/lib/eobuilder/origin" @@ -35,3 +38,8 @@ MIN_PACKAGE_VERSIONS = 10 # Keep a package version during minum X days MIN_AGE = 60 + +local_settings_file = os.environ.get('EOBUILDER_SETTINGS_FILE', + os.path.join(os.path.dirname(__file__), 'local_settings.py')) +if os.path.exists(local_settings_file): + execfile(local_settings_file)