kopia lustrzana https://github.com/wagtail/wagtail
Wording tweak
rodzic
a0ddfc9fec
commit
c3a4a30719
|
@ -171,7 +171,9 @@ should work fine without them.
|
|||
``RoutablePage`` now uses decorator syntax for defining views
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
In previous versions of Wagtail, ``RoutablePage`` models were configured by setting a ``subpage_urls`` attribute within the page model. This fails in Django 1.8, because it relies on passing the view function name as a string which is not an absolute module path. To address this, Wagtail 1.0 introduces a new syntax where each view function is annotated with a ``@route`` decorator - see :ref:`routable_page_mixin`.
|
||||
In previous versions of Wagtail, page types that used the :class:`~wagtail.contrib.wagtailroutablepage.models.RoutablePageMixin` had endpoints configured by setting their :attr:`~wagtail.contrib.wagtailroutablepage.models.RoutablePageMixin.subpage_urls` attribute to a list of urls with view names. This will not work on Django 1.8 as view names can no longer be passed into a url (see: https://docs.djangoproject.com/en/1.8/releases/1.8/#django-conf-urls-patterns).
|
||||
|
||||
Wagtail 1.0 introduces a new syntax where each view function is annotated with a ``@route`` decorator - see :ref:`routable_page_mixin`.
|
||||
|
||||
The old ``subpage_urls`` convention will continue to work on Django versions prior to 1.8, but this is now deprecated; all existing ``RoutablePage`` definitions should be updated to the decorator-based convention.
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue