From 011c1cac9aebe72b510951d3ad4d89e3fd49af15 Mon Sep 17 00:00:00 2001 From: SimGetti Date: Sat, 27 Jan 2024 15:43:53 +0100 Subject: [PATCH] Make contact email editable in settings.py --- la_chariotte/order/templatetags/settings.py | 9 +++++++++ la_chariotte/templates/base.html | 4 +++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 la_chariotte/order/templatetags/settings.py diff --git a/la_chariotte/order/templatetags/settings.py b/la_chariotte/order/templatetags/settings.py new file mode 100644 index 0000000..ae52ee3 --- /dev/null +++ b/la_chariotte/order/templatetags/settings.py @@ -0,0 +1,9 @@ +from django import template +from django.conf import settings + +register = template.Library() + + +@register.simple_tag +def settings_value(name): + return getattr(settings, name, "") \ No newline at end of file diff --git a/la_chariotte/templates/base.html b/la_chariotte/templates/base.html index e7e5cd9..6dc3fb2 100644 --- a/la_chariotte/templates/base.html +++ b/la_chariotte/templates/base.html @@ -1,4 +1,6 @@ {% load static %} +{% load settings %} + @@ -136,7 +138,7 @@
-

Contact : contact@chariotte.fr +

Contact : {% settings_value "CONTACT_MAIL" %}

Suivez la Chariotte sur :