-
Notifications
You must be signed in to change notification settings - Fork 5
Petey F
nmorduch edited this page Mar 17, 2022
·
9 revisions
newamerica-cms streamlines the publishing of Reports by
- Allowing editors to import formatted Word documents that are converted to Wagtail blocks
- Generates a PDF version of report
Importing word docs and generating PDFs happen when a report is saved. Both processes are run on a celery worker.
If an editor checks overwrite_sections_on_save
in Wagtail and has uploaded a source_word_doc
(see Report model), the word doc is parsed and converted to StreamFields, synchronously.
If an editor checks generate_pdf_on_publish
*, a PDF is generated on save, asynchronously. This can take up to a minute, so the editor will need to reload the page to see generated doc in the report_pdf
field. The most recent version of the report must be saved before generating PDF
* this process originally generated the PDF on publish, hence the misnomer 🤦.