v0.6.0 : DocxTemplate now accepts file-like objects

This commit is contained in:
Eric Lapouyade 2019-06-03 16:31:45 +02:00
parent d3ddb59d1c
commit d9b5a4d2ab
3 changed files with 6 additions and 2 deletions

View File

@ -1,3 +1,7 @@
0.6.0 (2019-06-03)
-------------------
- DocxTemplate now accepts file-like objects (Thanks to edufresne)
0.5.20 (2019-05-23) 0.5.20 (2019-05-23)
------------------- -------------------
- Fix #199 - Fix #199

View File

@ -7,7 +7,7 @@ Created : 2015-03-12
import functools import functools
import io import io
__version__ = '0.5.20' __version__ = '0.6.0'
from lxml import etree from lxml import etree
from docx import Document from docx import Document

View File

@ -24,6 +24,6 @@ context = {
} }
tpl.replace_embedded('templates/embedded_dummy.docx','templates/embedded_static_docx.docx') tpl.replace_embedded('templates/embedded_dummy.docx','templates/embedded_static_docx.docx')
tpl.replace_embedded('templates/embedded_dummy2.docx','templates/embedded_embedded_docx.docx') tpl.replace_embedded('templates/embedded_dummy2.docx','output/embedded_embedded_docx.docx')
tpl.render(context) tpl.render(context)
tpl.save('output/embedded.docx') tpl.save('output/embedded.docx')