Can easily be done by a template tag:
blog/templatetags/settings_value.py
1from django import template
2from django.conf import settings
3
4register = template.Library()
5
6@register.simple_tag
7def settings_value(name):
8 return getattr(settings, name, "")
In the template, you can use it as follows:
1{% settings_value "SITE_TITLE" %}
If this post was enjoyable or useful for you, please share it! If you have comments, questions, or feedback, you can email my personal email. To get new posts, subscribe use the RSS feed.