From 53c37a7b63d71675876f8a408e72f14c50bcc08c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9lestin=20Matte?= <gitlab@cmatte.me>
Date: Wed, 19 Jan 2022 10:36:52 +0100
Subject: [PATCH 3/4] Add options in settings.py to be able to select banner
 files

---
 web/pglister/lists/templates/base.html | 4 ++--
 web/pglister/settings.py               | 8 +++++++-
 2 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/web/pglister/lists/templates/base.html b/web/pglister/lists/templates/base.html
index 21e964d..d957b86 100644
--- a/web/pglister/lists/templates/base.html
+++ b/web/pglister/lists/templates/base.html
@@ -14,8 +14,8 @@
     <div class="container">
       <div class="row">
 	<div class="col-sm-12" id="pglisterhdr">
-	  <a href="/"><img src="/media/img/hdr_left.png" alt="{{organization_info.name}}" /></a>
-	  <img class="pull-right hidden-xs" src="/media/img/hdr_right.png" alt="{{organization_info.motto}}" />
+	  <a href="/"><img src="/media/img/{{organization_info.banner_left}}" alt="{{organization_info.name}}" /></a>
+	  <img class="pull-right hidden-xs" src="/media/img/{{organization_info.banner_right}}" alt="{{organization_info.motto}}" />
 	</div>
       </div>
 {%if messages%}
diff --git a/web/pglister/settings.py b/web/pglister/settings.py
index da9d7df..e65d00c 100644
--- a/web/pglister/settings.py
+++ b/web/pglister/settings.py
@@ -118,7 +118,13 @@ STATIC_URL = '/media/'
 
 ORGANIZATION_INFO = {
     'name': 'PostgreSQL',
-    'motto': "The world's most advanced open source database"
+    'motto': "The world's most advanced open source database",
+    # To use a different banner, change file names here and place images
+    # in /media/img/.
+    # You can use hdr_left_generic.png and hdr_right_generic.png to remove
+    # mentions of PostgreSQL
+    'banner_left': 'hdr_left.png',
+    'banner_right': 'hdr_right.png',
 }
 
 # Override in local settings
-- 
2.34.1

