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
intoMultiplePreviewMixin
-
BasePdfViewMixin
as renamed toBasePdfMixin
-
BasePdfMixin.get_pdf_view()
was reworked, methods likeBasePdfMixin.get_pdf_view_kwargs()
were added to be more similar to wagtail style methods - Parts of
PdfViewPageMixin
were split off intoBasePdfMixin
andBasePreviewablePdfMixin
-
PdfModelMixin
was created based onBasePdfMixin
and wagtail'sPreviewableMixin
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
, andpreview_panel_pdf_view
. -
PdfViewSetMixin
andPdfAdminViewSetMixin
now replace old ModelAdmin mixins - The 'show live' button in
PdfViewSetMixin
is added to theIndexView
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