Skip to content

Wagtail 6 support, ViewSets, previewable models

Latest
Compare
Choose a tag to compare
@donhauser donhauser released this 30 Jan 18:50

The new update restores compatibility to wagtail 6.
Plenty of code was reworked to unite ViewSet and PDF-rendering functionallity for models and improvedly adapts the module to the wagtail ecosystem. (Legacy ModelAdmin code is not supported any more.)
The changes bring several enhancements, for example PDF renderable models can now be previewed during creation/editing.

Bugfixes and changes

  • Added missing pdfjs files (pdf.mjs, ...)
  • separated preview functionality from RoutablePageMixin into MultiplePreviewMixin
  • BasePdfViewMixin as renamed to BasePdfMixin
  • BasePdfMixin.get_pdf_view() was reworked, methods like BasePdfMixin.get_pdf_view_kwargs() were added to be more similar to wagtail style methods
  • Parts of PdfViewPageMixin were split off into BasePdfMixin and BasePreviewablePdfMixin
  • PdfModelMixin was created based on BasePdfMixin and wagtail's PreviewableMixin to enable pdf servable models
  • PreviewableViewSetMixin was added for utilizing wagtail's PreviewableMixin
  • Models and Pages now support the specification of separate preview classes through pdf_view, preview_pdf_view, and preview_panel_pdf_view.
  • PdfViewSetMixin and PdfAdminViewSetMixin now replace old ModelAdmin mixins
  • The 'show live' button in PdfViewSetMixin is added to the IndexView if the models URL could be reversed
  • pdf_options dictionaries from different sources are not merged any more
  • register_pdf_view hook was added to easily create viewable PDF models
  • 'wagtail_pdf_view.urls' should now be used to register the modules urls
  • latex code was moved to a separate app wagtail_pdf_view_tex