From bd2d622db9c435c1def0275feb7018c1e41570db Mon Sep 17 00:00:00 2001 From: Jaap Joris Vens Date: Tue, 17 Mar 2020 18:15:58 +0100 Subject: [PATCH] Warning! Backwards-incompatible change: custom views should now be placed in cms.py (instead of views.py) --- cms/apps.py | 4 +--- cms/templates/cms/base.html | 2 +- cms/templates/cms/sections/section.html | 5 ++++- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/cms/apps.py b/cms/apps.py index 160100e..6807913 100644 --- a/cms/apps.py +++ b/cms/apps.py @@ -7,6 +7,4 @@ class CmsConfig(AppConfig): verbose_name = _('Content Management System') def ready(self): - # Need to load view models of all installed apps to make the - # register_view decorator work - autodiscover_modules('views') + autodiscover_modules('cms') diff --git a/cms/templates/cms/base.html b/cms/templates/cms/base.html index b7e86cf..d8df9e7 100644 --- a/cms/templates/cms/base.html +++ b/cms/templates/cms/base.html @@ -12,7 +12,7 @@ {% block extrahead %}{% endblock %} - +
{% block main %} diff --git a/cms/templates/cms/sections/section.html b/cms/templates/cms/sections/section.html index 7fe875c..34f1aee 100644 --- a/cms/templates/cms/sections/section.html +++ b/cms/templates/cms/sections/section.html @@ -38,6 +38,9 @@ {% endif %} - {% include 'cms/editlink.html' %} + {% if request.user.is_staff %} + {% trans 'edit' %} + {% endif %} +