kopia lustrzana https://github.com/wagtail/wagtail
Add initial upgrade considerations for PreviewableMixin methods
rodzic
ae8f0514bc
commit
0d78f8eb56
|
@ -126,6 +126,10 @@ Wagtail’s 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.
|
||||
|
|
Ładowanie…
Reference in New Issue