Merge remote-tracking branch 'origin/master'
This commit is contained in:
commit
83ecb60bdd
7
Pipfile.lock
generated
7
Pipfile.lock
generated
@ -234,11 +234,12 @@
|
||||
},
|
||||
"setuptools": {
|
||||
"hashes": [
|
||||
"sha256:6c1fccdac05a97e598fb0ae3bbed5904ccb317337a51139dcd51453611bbb987",
|
||||
"sha256:c636ac361bc47580504644275c9ad802c50415c7522212252c033bd15f301f32"
|
||||
"sha256:54faa7f2e8d2d11bcd2c07bed282eef1046b5c080d1c32add737d7b5817b1ad4",
|
||||
"sha256:f211a66637b8fa059bb28183da127d4e86396c991a942b028c6650d4319c3fd0"
|
||||
],
|
||||
"index": "pypi",
|
||||
"markers": "python_version >= '3.8'",
|
||||
"version": "==69.5.1"
|
||||
"version": "==70.0.0"
|
||||
},
|
||||
"six": {
|
||||
"hashes": [
|
||||
|
||||
@ -288,6 +288,16 @@ calling method `new_subdoc()` ::
|
||||
tpl = DocxTemplate('templates/merge_docx_master_tpl.docx')
|
||||
sd = tpl.new_subdoc('templates/merge_docx_subdoc.docx')
|
||||
|
||||
context = {
|
||||
'mysubdoc': sd,
|
||||
}
|
||||
|
||||
tpl.render(context)
|
||||
tpl.save('output/merge_docx.docx')
|
||||
|
||||
In the above example, the content of 'templates/merge_docx_subdoc.docx' will be inserted into the parent document in place of the declared
|
||||
variable `{{ mysubdoc }}`.
|
||||
|
||||
See `tests/merge_docx.py` for full code.
|
||||
|
||||
.. _Escaping:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user