diff --git a/board/context_processors.py b/board/context_processors.py new file mode 100644 index 0000000..6fd946a --- /dev/null +++ b/board/context_processors.py @@ -0,0 +1,5 @@ +from django.conf import settings as django_settings + + +def settings(request): + return {"settings": django_settings} diff --git a/board/templates/board/base.html b/board/templates/board/base.html index 9334072..b281cfa 100644 --- a/board/templates/board/base.html +++ b/board/templates/board/base.html @@ -5,7 +5,7 @@ - {% block title %}{% if title %}{{title}}{% else %}Index{% endif %}{% endblock %} + {% block title %}- {{settings.SITE_NAME}}{% endblock %} {% block extrastyle %}{% endblock %} diff --git a/threadchat/settings.py b/threadchat/settings.py index 6f1e957..51d51cb 100644 --- a/threadchat/settings.py +++ b/threadchat/settings.py @@ -70,6 +70,7 @@ TEMPLATES = [ "django.template.context_processors.request", "django.contrib.auth.context_processors.auth", "django.contrib.messages.context_processors.messages", + "board.context_processors.settings", ], }, }, @@ -139,6 +140,9 @@ X_FRAME_OPTIONS = "SAMEORIGIN" DEFAULT_AUTO_FIELD = "django.db.models.BigAutoField" +# Site name +SITE_NAME = "interchan" + # Media root - where media files are stored on the disk MEDIA_ROOT = "media/"