donhauser / wagtail-pdf

PDF rendering views for the Wagtail CMS
Apache License 2.0
23 stars 8 forks source link

CI issue with template #10

Open ollz272 opened 2 years ago

ollz272 commented 2 years ago

We get the following error when using django-extentions "validate-templates" command:

 CommandError: 1 errors found
/home/runner/work/shiftingpower/shiftingpower/.tox/py310/lib/python3.10/site-packages/wagtail_pdf_view/templates/wagtail_preamble.tex: TemplateSyntaxError Invalid block tag on line 9: 'raw'. Did you forget to register or load this tag?
make: *** [Makefile:144: django-check-validate-templates] Error 1#

Any chance someone could take a look?

donhauser commented 2 years ago

Hi, for LaTeX support this library relies on django-tex, which uses Jinja2 to render the templates. Unlike in Plain Django, in Jinja2 {raw} is a valid block (used to escape tex-characters here)

I would guess that django-check-validate-templates does not support jinja2, at least with your configuration