feature: expose the default PDF template content via the API #37

Closed
opened 2026-11-01 19:39:41 +00:00 by Gilles · 0 comments
Owner

Adds PdfTemplateViewSet.default_content so the frontend's template editor can offer a "reset to default" action without duplicating DEFAULT_PDF_TEMPLATE_HTML client-side -- same reasoning as poulpinou's own server-side mail_template_reset: the default lives in exactly one place.

This was originally written as PR #19 on the stale feature/pdf-export branch (commit 74521e48a) before the repo switched to prod mode, and never got merged into master. Re-applying it cleanly on top of current master (the model/serializer/permission shape around PdfTemplateViewSet hasn't changed in a way that affects it).

Adds `PdfTemplateViewSet.default_content` so the frontend's template editor can offer a "reset to default" action without duplicating `DEFAULT_PDF_TEMPLATE_HTML` client-side -- same reasoning as poulpinou's own server-side `mail_template_reset`: the default lives in exactly one place. This was originally written as PR #19 on the stale `feature/pdf-export` branch (commit 74521e48a) before the repo switched to prod mode, and never got merged into master. Re-applying it cleanly on top of current master (the model/serializer/permission shape around `PdfTemplateViewSet` hasn't changed in a way that affects it).
Sign in to join this conversation.
No description provided.