feat: allow customizable about page

This commit is contained in:
Markos Gogoulos 2025-09-21 15:47:04 +03:00
parent 208f0b338b
commit 56182f0a6d
2 changed files with 7 additions and 1 deletions

View File

@ -12,6 +12,7 @@ friendly_token = r"(?P<friendly_token>[\w\-_]*)"
urlpatterns = [
path("i18n/", include("django.conf.urls.i18n")),
re_path(r"^$", views.index),
re_path(r"^about", views.about, name="about"),
re_path(r"^setlanguage", views.setlanguage, name="setlanguage"),
re_path(r"^add_subtitle", views.add_subtitle, name="add_subtitle"),
re_path(r"^edit_subtitle", views.edit_subtitle, name="edit_subtitle"),
@ -110,7 +111,6 @@ urlpatterns = [
# Media uploads in ADMIN created pages
re_path(r"^tinymce/upload/", tinymce_handlers.upload_image, name="tinymce_upload_image"),
re_path("^(?P<slug>[\w.-]*)$", views.get_page, name="get_page"), # noqa: W605
re_path(r"^about", views.about, name="about"),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

View File

@ -60,6 +60,12 @@ def record_screen(request):
def about(request):
"""About view"""
page = Page.objects.filter(slug="about").first()
if page:
context = {}
context["page"] = page
return render(request, "cms/page.html", context)
context = {"VERSION": VERSION}
return render(request, "cms/about.html", context)