hugokernel 878197a93c Force header / footer nodes format.
get_headers_footers_xml was returning the xml in a raw string without any
processing on it. If we had a quote in docx document, it was encode in a xml
entity ("), but because of the entities, Jinja raise error.

Now, xml passes through etree.tostring and we have a clean string.
2017-06-09 10:06:33 +02:00
2015-11-09 22:08:07 +01:00
2015-03-13 11:59:50 +01:00
2015-03-13 11:59:50 +01:00
2015-03-12 18:13:24 +01:00
2015-03-12 18:13:24 +01:00
2015-05-13 17:46:59 +02:00

====================
python-docx-template
====================

Use a docx as a jinja2 template

Introduction
------------

This package uses 2 major packages :

- python-docx for reading, writing and creating sub documents
- jinja2 for managing tags inserted into the template docx

python-docx-template has been created because python-docx is powerful for creating documents but not for modifying them.

The idea is to begin to create an exemple of the document you want to generate with microsoft word, it can be as complex as you want :
pictures, index tables, footer, header, variables, anything you can do with word.
Then, as you are still editing the document with microsoft word, you insert jinja2-like tags directly in the document.
You save the document as a .docx file (xml format) : it will be your .docx template file.

Now you can use python-docx-template to generate as many word documents you want from this .docx template and context variables you will associate.

Documentation
-------------

Please, `read the doc <http://docxtpl.readthedocs.org>`_
Description
Use a docx as a jinja2 template
Readme 4.8 MiB
Languages
Python 100%