From ac1092489d748a6e0e48338894f3e24171bce3f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20P=C3=A9ters?= Date: Mon, 31 May 2021 10:23:45 +0200 Subject: [PATCH] settings: add support for local settings --- pfwb_archives_proxy/settings.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pfwb_archives_proxy/settings.py b/pfwb_archives_proxy/settings.py index 773dcdf..58d92f6 100644 --- a/pfwb_archives_proxy/settings.py +++ b/pfwb_archives_proxy/settings.py @@ -117,3 +117,10 @@ USE_TZ = True # https://docs.djangoproject.com/en/2.2/howto/static-files/ STATIC_URL = '/static/' + + +local_settings_file = os.environ.get( + 'PFWB_ARCHIVES_PROXY_SETTINGS_FILE', os.path.join(os.path.dirname(__file__), 'local_settings.py') +) +if os.path.exists(local_settings_file): + exec(open(local_settings_file).read())