From 664bb845fa50c1dbec8a7dd41517c5252f87eb1f Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 15 Jul 2024 19:38:23 +0000 Subject: [PATCH 1/2] Bump setuptools from 69.5.1 to 70.0.0 Bumps [setuptools](https://github.com/pypa/setuptools) from 69.5.1 to 70.0.0. - [Release notes](https://github.com/pypa/setuptools/releases) - [Changelog](https://github.com/pypa/setuptools/blob/main/NEWS.rst) - [Commits](https://github.com/pypa/setuptools/compare/v69.5.1...v70.0.0) --- updated-dependencies: - dependency-name: setuptools dependency-type: indirect ... Signed-off-by: dependabot[bot] --- Pipfile.lock | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/Pipfile.lock b/Pipfile.lock index 1613110..90501d1 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -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": [ From 0642badebc6f6ee4356660d73bbfc4922f45eb10 Mon Sep 17 00:00:00 2001 From: jkpet <60282159+jkpet@users.noreply.github.com> Date: Fri, 19 Jul 2024 17:03:07 +1000 Subject: [PATCH 2/2] Update index.rst Updating 'sub-document' documentation to make explicit what was already implicit. --- docs/index.rst | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/docs/index.rst b/docs/index.rst index e54c757..517c3e8 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -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: