Skip to content

Commit

Permalink
chore: replace unmaintained docx-mailmerge with docx-mailmerge2
Browse files Browse the repository at this point in the history
Relates to #570
  • Loading branch information
open-dynaMIX authored and anehx committed Jul 1, 2024
1 parent 21e7145 commit 57fcd23
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion document_merge_service/api/engines.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ def _get_placeholders(self, document):
return [
field.attrib.get("name")
for part in document.parts.values()
for field in part.findall("//MergeField")
for field in part["part"].findall(".//MergeField")
]

def validate_template_syntax(self, available_placeholders=None, sample_data=None):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@
</w:rPr>
<w:t xml:space="preserve">Test: </w:t>
</w:r>
<w:r>
<w:r w:rsidR="00211734">
<w:rPr>
<w:lang w:val="en-US"/>
</w:rPr>
Expand Down
12 changes: 6 additions & 6 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ django-filter = "^24.2"
django-generic-api-permissions = "^0.4.6"
django-storages = "^1.14.3"
djangorestframework = "^3.15.1"
docx-mailmerge = "^0.5.0"
docx-mailmerge2 = "^0.8.0"
docxtpl = "^0.17.0"
Jinja2 = "^3.1.4"
mysqlclient = { version = "^2.2.4", optional = true }
Expand Down

0 comments on commit 57fcd23

Please sign in to comment.