Python模板化处理Word
doc = DocxTemplate('examples/sample.docx')
context = {
'table': Table(data=[['this is the first cell of the first row', 'this is the second cell of the first row'],
['the second row', 'etc'],
['etc', 'etc]],
headers=['header 1', 'header 2']),
'image': Image('pigeon.jpg')
'html': HTML(bold-notboldho ...