templated-docs
templated-docs copied to clipboard
May provide corrupted document
When coding Django's tags via LibreOffice window, we are practically unable to control the way LibreOffice stores them in its messy zipped od*
archive. One may happen that Django's tags are messed up with xml
tags as shown below:
<text:p text:style-name="P21">Lorem ipsum {{
<text:span text:style-name="T12">element.el0 }</text:span>}
<text:span text:style-name="T12">and {{ element.el1 }} and {{ element.el2 }} and </text:span>{{
<text:span text:style-name="T12">element.eln }</text:span>}
</text:p>
So templated-docs
unzips template and Django replaces its tags with data. But how it works with markup like this }</text:span>}
? Obviously, source xml
will be broken and, furthermore, od*
corrupted.
Maybe here is the explanation of the issue #8
I don't know if there's any way to fix the issue except programming source xml
.
Perhaps use odf's fields as in this project: https://github.com/jakogut/python-relatorio
Thanks for comment @danilogbotelho. Issue persists with ODF fields too. And actually I see no reason why it should not. As document is getting more complicated, sooner or later you will unfortunately face the issue.