Skip to content

Commit 56182f0

Browse files
committed
feat: allow customizable about page
1 parent 208f0b3 commit 56182f0

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

files/urls.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
urlpatterns = [
1313
path("i18n/", include("django.conf.urls.i18n")),
1414
re_path(r"^$", views.index),
15+
re_path(r"^about", views.about, name="about"),
1516
re_path(r"^setlanguage", views.setlanguage, name="setlanguage"),
1617
re_path(r"^add_subtitle", views.add_subtitle, name="add_subtitle"),
1718
re_path(r"^edit_subtitle", views.edit_subtitle, name="edit_subtitle"),
@@ -110,7 +111,6 @@
110111
# Media uploads in ADMIN created pages
111112
re_path(r"^tinymce/upload/", tinymce_handlers.upload_image, name="tinymce_upload_image"),
112113
re_path("^(?P<slug>[\w.-]*)$", views.get_page, name="get_page"), # noqa: W605
113-
re_path(r"^about", views.about, name="about"),
114114
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
115115

116116

files/views/pages.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,12 @@ def record_screen(request):
6060
def about(request):
6161
"""About view"""
6262

63+
page = Page.objects.filter(slug="about").first()
64+
if page:
65+
context = {}
66+
context["page"] = page
67+
return render(request, "cms/page.html", context)
68+
6369
context = {"VERSION": VERSION}
6470
return render(request, "cms/about.html", context)
6571

0 commit comments

Comments
 (0)