elapouya / python-docx-template

Use a docx as a jinja2 template
GNU Lesser General Public License v2.1
1.92k stars 378 forks source link

How to change SmartArt #524

Open Asteri5m opened 5 months ago

Asteri5m commented 5 months ago

Describe your problem

output.docx template.docx

A simple example is as follows:

from docxtpl import DocxTemplate

template = DocxTemplate('template.docx')
context = {'num1': 1, 'num2': 2, 'num3': 3, 'num4': 4, 'num5': 5}
template.render(context)
template.save('output.docx')

Its input and output are the same without any change: image

More details about your problem

Python 3.11.4 Django 4.2.4 docxtpl 0.16.7 python-docx 1.1.0