From 0a45fb0330a54cad6417e8795dcfa9c5b654c57c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9lestin=20Matte?= <gitlab@cmatte.me>
Date: Tue, 2 Nov 2021 16:51:51 +0100
Subject: [PATCH 1/3] Add orgname tag and settings to define organization name

---
 web/pglister/lists/templatetags/pglister.py | 8 ++++++++
 web/pglister/settings.py                    | 3 +++
 2 files changed, 11 insertions(+)

diff --git a/web/pglister/lists/templatetags/pglister.py b/web/pglister/lists/templatetags/pglister.py
index ad2fc99..6d1ed5f 100644
--- a/web/pglister/lists/templatetags/pglister.py
+++ b/web/pglister/lists/templatetags/pglister.py
@@ -1,6 +1,7 @@
 from django import template
 from django.template.defaultfilters import stringfilter
 from django.utils.safestring import mark_safe
+from django.conf import settings
 
 from lib.baselib.lists import ModerationReason, ModerationOption
 
@@ -80,3 +81,10 @@ def moderation_options(context, reason, is_subscribed):
 @register.filter
 def replacepercent(obj, replacewith):
     return obj.replace('%', replacewith)
+
+@register.simple_tag
+def org(arg):
+    if arg == "name":
+        return settings.ORGANIZATION_NAME
+    elif arg == "motto":
+        return settings.ORGANIZATION_MOTTO
diff --git a/web/pglister/settings.py b/web/pglister/settings.py
index ba69207..db375b6 100644
--- a/web/pglister/settings.py
+++ b/web/pglister/settings.py
@@ -114,6 +114,9 @@ DATETIME_FORMAT = "Y-m-d H:i:s"
 
 STATIC_URL = '/media/'
 
+ORGANIZATION_NAME = 'PostgreSQL'
+ORGANIZATION_MOTTO = "The world's most advanced open source database"
+
 # Override in local settings
 USE_PG_COMMUNITY_AUTH = True  # Right now we *always* do, but this is used to turn on/off some local features
 PGAUTH_REDIRECT = "http://localhost:8000/account/auth/12/"
-- 
2.33.1

