File: 0001-Make-database-user-configurable-through-environment.patch

package info (click to toggle)
python-django-pgschemas 1.0.1-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 848 kB
  • sloc: python: 3,887; makefile: 33; sh: 10; sql: 2
file content (21 lines) | stat: -rw-r--r-- 747 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
From: Michael Fladischer <FladischerMichael@fladi.at>
Date: Sun, 30 Oct 2022 12:01:33 +0000
Subject: Make database user configurable through environment.

---
 sandbox/settings.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sandbox/settings.py b/sandbox/settings.py
index b832fd4..ceba544 100644
--- a/sandbox/settings.py
+++ b/sandbox/settings.py
@@ -126,7 +126,7 @@ DATABASES = {
     "default": {
         "ENGINE": "django_pgschemas.postgresql",
         "NAME": "sandbox",
-        "USER": "postgres",
+        "USER": os.environ.get("DATABASE_USER", "postgres"),
         "PASSWORD": os.environ.get("DATABASE_PASSWORD", "postgres"),
         "HOST": os.environ.get("DATABASE_HOST", "localhost"),
         "PORT": "",