public inbox for [email protected]
help / color / mirror / Atom feedFrom: Célestin Matte <[email protected]>
To: PostgreSQL WWW <[email protected]>
Subject: [PATCH] pglister: Add possibility to override settings.py in settings_local.py
Date: Wed, 27 Oct 2021 17:02:15 +0200
Message-ID: <[email protected]> (raw)
Following the model of pgweb and pgarchives
--
Célestin Matte
Attachments:
[text/x-patch] 0001-Add-possibility-to-override-settings.py-in-settings_.patch (1.3K, 2-0001-Add-possibility-to-override-settings.py-in-settings_.patch)
download | inline diff:
From c1c08dca0117724a78a642f44ec64a2cc9e9e78c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9lestin=20Matte?= <[email protected]>
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
view thread (5+ messages) latest in thread
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: [email protected]
Cc: [email protected], [email protected]
Subject: Re: [PATCH] pglister: Add possibility to override settings.py in settings_local.py
In-Reply-To: <[email protected]>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox