From b550e25bbd6c53815b761a08d9beb4804141a0a5 Mon Sep 17 00:00:00 2001 From: Jaap Joris Vens Date: Tue, 27 Aug 2019 14:25:55 +0200 Subject: [PATCH] move edit page button --- cms/admin.py | 1 + cms/templates/cms/page.html | 12 ++++++------ 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/cms/admin.py b/cms/admin.py index 26dead5..466cf37 100644 --- a/cms/admin.py +++ b/cms/admin.py @@ -21,6 +21,7 @@ class PageAdmin(admin.ModelAdmin): class SectionAdmin(admin.ModelAdmin): inlines = [InlineSubSectionAdmin] list_filter = ['page'] + list_display = ['__str__', 'get_type_display'] @admin.register(SubSection) class SubSectionAdmin(admin.ModelAdmin): diff --git a/cms/templates/cms/page.html b/cms/templates/cms/page.html index 4ba1fda..c72e184 100644 --- a/cms/templates/cms/page.html +++ b/cms/templates/cms/page.html @@ -4,6 +4,12 @@ {% block title %}{{block.super}} - {{page.title}}{% endblock %} {% block content %} + {% for section in sections %} +
+ {% include 'cms/sections/'|add:section.type|add:'.html' %} +
+ {% endfor %} +
{% if user.is_staff %} {% if page.slug %} @@ -16,12 +22,6 @@ {% endif %}
- {% for section in sections %} -
- {% include 'cms/sections/'|add:section.type|add:'.html' %} -
- {% endfor %} - {% if user.is_staff %}