mirror of
https://github.com/mediacms-io/mediacms.git
synced 2025-11-05 23:18:53 -05:00
feat: allow customizable about page
This commit is contained in:
parent
208f0b338b
commit
56182f0a6d
@ -12,6 +12,7 @@ friendly_token = r"(?P<friendly_token>[\w\-_]*)"
|
|||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path("i18n/", include("django.conf.urls.i18n")),
|
path("i18n/", include("django.conf.urls.i18n")),
|
||||||
re_path(r"^$", views.index),
|
re_path(r"^$", views.index),
|
||||||
|
re_path(r"^about", views.about, name="about"),
|
||||||
re_path(r"^setlanguage", views.setlanguage, name="setlanguage"),
|
re_path(r"^setlanguage", views.setlanguage, name="setlanguage"),
|
||||||
re_path(r"^add_subtitle", views.add_subtitle, name="add_subtitle"),
|
re_path(r"^add_subtitle", views.add_subtitle, name="add_subtitle"),
|
||||||
re_path(r"^edit_subtitle", views.edit_subtitle, name="edit_subtitle"),
|
re_path(r"^edit_subtitle", views.edit_subtitle, name="edit_subtitle"),
|
||||||
@ -110,7 +111,6 @@ urlpatterns = [
|
|||||||
# Media uploads in ADMIN created pages
|
# Media uploads in ADMIN created pages
|
||||||
re_path(r"^tinymce/upload/", tinymce_handlers.upload_image, name="tinymce_upload_image"),
|
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("^(?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)
|
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -60,6 +60,12 @@ def record_screen(request):
|
|||||||
def about(request):
|
def about(request):
|
||||||
"""About view"""
|
"""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}
|
context = {"VERSION": VERSION}
|
||||||
return render(request, "cms/about.html", context)
|
return render(request, "cms/about.html", context)
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user