Update for 4.0 serve()
See https://docs.wagtail.org/en/stable/releases/4.0.html#upgrade-considerations -- serve_preview()
has been decoupled from serve()
.
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.