From 476a2d1ce18fc56a097dd5e0f870af5e92302a98 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9lestin=20Matte?= 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 | 5 +++++ web/pglister/settings.py | 2 ++ 2 files changed, 7 insertions(+) diff --git a/web/pglister/lists/templatetags/pglister.py b/web/pglister/lists/templatetags/pglister.py index ad2fc99..3360284 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,7 @@ def moderation_options(context, reason, is_subscribed): @register.filter def replacepercent(obj, replacewith): return obj.replace('%', replacewith) + +@register.simple_tag +def orgname(): + return settings.ORGANIZATION_NAME diff --git a/web/pglister/settings.py b/web/pglister/settings.py index ba69207..6da88a1 100644 --- a/web/pglister/settings.py +++ b/web/pglister/settings.py @@ -114,6 +114,8 @@ DATETIME_FORMAT = "Y-m-d H:i:s" STATIC_URL = '/media/' +ORGANIZATION_NAME = 'PostgreSQL' + # 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