Warning! Backwards-incompatible change: custom views should now be placed in

cms.py (instead of views.py)
main
Jaap Joris Vens 2020-03-17 18:15:58 +01:00
rodzic 045b05a337
commit bd2d622db9
3 zmienionych plików z 6 dodań i 5 usunięć

Wyświetl plik

@ -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')

Wyświetl plik

@ -12,7 +12,7 @@
<link rel="icon" href="{% static 'favicon.png' %}">
{% block extrahead %}{% endblock %}
</head>
<body>
<body class="{% block bodyclass %}{% endblock %}">
<main>
{% block main %}

Wyświetl plik

@ -38,6 +38,9 @@
</div>
{% endif %}
{% include 'cms/editlink.html' %}
{% if request.user.is_staff %}
<a class="edit" href="edit/{{section.number}}/">{% trans 'edit' %}</a>
{% endif %}
</div>
</section>