Add initial upgrade considerations for PreviewableMixin methods

pull/8857/head^2
Sage Abdullah 2022-06-22 10:42:44 +07:00 zatwierdzone przez Karl Hobley
rodzic ae8f0514bc
commit 0d78f8eb56
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -126,6 +126,10 @@ Wagtails page preview is now available in a side panel within the page editor
## Upgrade considerations
### Changes to `Page.serve()` and `Page.serve_preview()` methods
As part of making previews available to non-page models, the `serve_preview()` method has been decoupled from the `serve()` method and extracted into the `PreviewableMixin` class. If you have overridden the `serve()` method in your page models, you will likely need to override `serve_preview()`, `get_preview_template()`, and/or `get_preview_context()` methods to handle previews accordingly. Alternatively, you can also override the `preview_modes` property to return an empty list to disable previews.
### `base_url_path` keyword argument added to AdminURLHelper
The `wagtail.contrib.modeladmin.helpers.AdminURLHelper` class now accepts a `base_url_path` keyword argument on its constructor. Custom subclasses of this class should be updated to accept this keyword argument.