From c1c08dca0117724a78a642f44ec64a2cc9e9e78c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9lestin=20Matte?= <gitlab@cmatte.me>
Date: Wed, 27 Oct 2021 16:58:05 +0200
Subject: [PATCH] Add possibility to override settings.py in settings_local.py

Following the model of pgweb and pgarchives
---
 .gitignore               | 1 +
 setup.cfg                | 2 +-
 web/pglister/settings.py | 3 +++
 3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index 8e29657..788789f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
 *.pyc
 /pglister.ini
 .idea
+web/pglister/settings_local.py
diff --git a/setup.cfg b/setup.cfg
index af55e73..af3c0c8 100644
--- a/setup.cfg
+++ b/setup.cfg
@@ -1,5 +1,5 @@
 [pycodestyle]
 statistics=True
 ignore=E402,E501,E741,W504
-exclude=web/dep,web/pglister/auth.py
+exclude=web/dep,web/pglister/auth.py,web/pglister/settings_local.py
 max-line-length=120
diff --git a/web/pglister/settings.py b/web/pglister/settings.py
index ba69207..efa34ea 100644
--- a/web/pglister/settings.py
+++ b/web/pglister/settings.py
@@ -149,3 +149,6 @@ if EXIM_INTEGRATION:
 if DEBUG and DEBUG_TOOLBAR:
     MIDDLEWARE.append('debug_toolbar.middleware.DebugToolbarMiddleware')
     INSTALLED_APPS.append('debug_toolbar')
+
+# Load local settings overrides
+from .settings_local import *
-- 
2.33.1

