|
@@ -63,7 +63,7 @@ Thank you to core contributor LB (Ben) Johnston for writing this documentation.
|
|
|
|
|
|
### `ModelViewSet` improvements
|
|
|
|
|
|
-Several features from `~wagtail.snippets.views.snippets.SnippetViewSet` have been implemented in `~wagtail.admin.viewsets.model.ModelViewSet`, allowing you to use them without registering your models as snippets. For more details on using `ModelViewSet`, refer to [](generic_views).
|
|
|
+Several features from {class}`~wagtail.snippets.views.snippets.SnippetViewSet` have been implemented in {class}`~wagtail.admin.viewsets.model.ModelViewSet`, allowing you to use them without registering your models as snippets. For more details on using `ModelViewSet`, refer to [](generic_views).
|
|
|
|
|
|
* Move `SnippetViewSet` menu registration mechanism to base `ViewSet` class (Sage Abdullah)
|
|
|
* Move `SnippetViewSet` template override mechanism to `ModelViewSet` (Sage Abdullah)
|
|
@@ -300,7 +300,7 @@ def register_frank_menu_item():
|
|
|
|
|
|
### Edit and delete URLs in `ModelViewSet` changed to allow non-integer primary keys
|
|
|
|
|
|
-To accommodate models with non-integer primary keys, the URL patterns for the edit and delete views in `~wagtail.admin.viewsets.model.ModelViewSet` have been changed.
|
|
|
+To accommodate models with non-integer primary keys, the URL patterns for the edit and delete views in {class}`~wagtail.admin.viewsets.model.ModelViewSet` have been changed.
|
|
|
|
|
|
Relative to the viewset's {attr}`~wagtail.admin.viewsets.base.ViewSet.url_prefix`, the following changes have been made:
|
|
|
- The edit URL pattern has been changed from `<int:pk>/` to `edit/<str:pk>/`
|
|
@@ -310,7 +310,7 @@ If you use {func}`~django.urls.reverse` with {meth}`~wagtail.admin.viewsets.base
|
|
|
|
|
|
Redirects for the legacy URLs are in place for backwards compatibility, but will be removed in a future release.
|
|
|
|
|
|
-The URLs for snippets underwent similar changes in Wagtail 2.14. The redirects for the legacy URLs in `~wagtail.snippets.views.snippets.SnippetViewSet` have now been marked for removal in a future release.
|
|
|
+The URLs for snippets underwent similar changes in Wagtail 2.14. The redirects for the legacy URLs in {class}`~wagtail.snippets.views.snippets.SnippetViewSet` have now been marked for removal in a future release.
|
|
|
|
|
|
### `ModelViewSet` automatically registers the model to the reference index
|
|
|
|