remove f-string for python < 3.6 compability
This commit is contained in:
parent
589262664f
commit
e574b6c650
@ -1,7 +1,9 @@
|
|||||||
0.15.0 (2021-12-20)
|
0.15.1 (2021-12-20)
|
||||||
-------------------
|
-------------------
|
||||||
- Multi-rendering with same DocxTemplate object is now possible
|
- Multi-rendering with same DocxTemplate object is now possible
|
||||||
see tests/multi_rendering.py
|
see tests/multi_rendering.py
|
||||||
|
- fix #392
|
||||||
|
- fix #398
|
||||||
|
|
||||||
0.14.1 (2021-10-01)
|
0.14.1 (2021-10-01)
|
||||||
-------------------
|
-------------------
|
||||||
|
|||||||
@ -110,6 +110,15 @@ But use this instead in your docx template ::
|
|||||||
This syntax is possible because MS Word considers each line as a new paragraph and
|
This syntax is possible because MS Word considers each line as a new paragraph and
|
||||||
``{%p`` tags are not in the same paragraph in the second case.
|
``{%p`` tags are not in the same paragraph in the second case.
|
||||||
|
|
||||||
|
Multiple rendering
|
||||||
|
..................
|
||||||
|
|
||||||
|
Since v0.15.0, it is possible to create ``DocxTemplate`` object once and call
|
||||||
|
``render(context)`` several times. Note that if you want to use replacement
|
||||||
|
methods like ``replace_media()``, ``replace_embedded()`` and/or ``replace_zipname()``
|
||||||
|
during multiple rendering, you will have to call ``reset_replacements()``
|
||||||
|
at rendering loop start.
|
||||||
|
|
||||||
Split and merge text
|
Split and merge text
|
||||||
....................
|
....................
|
||||||
|
|
||||||
|
|||||||
@ -4,7 +4,7 @@ Created : 2015-03-12
|
|||||||
|
|
||||||
@author: Eric Lapouyade
|
@author: Eric Lapouyade
|
||||||
"""
|
"""
|
||||||
__version__ = '0.15.0'
|
__version__ = '0.15.1'
|
||||||
|
|
||||||
# flake8: noqa
|
# flake8: noqa
|
||||||
from .inline_image import InlineImage
|
from .inline_image import InlineImage
|
||||||
|
|||||||
@ -37,4 +37,4 @@ for document_data in documents_data:
|
|||||||
dest_file = document_data['dest_file']
|
dest_file = document_data['dest_file']
|
||||||
context = document_data['context']
|
context = document_data['context']
|
||||||
tpl.render(context)
|
tpl.render(context)
|
||||||
tpl.save(f'output/{dest_file}')
|
tpl.save('output/%s' % dest_file)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user