I'm not sure if I understand the problem correctly, but if you are wanting to serve HTML files rendered as ODT, you could take the following steps:
1. In your view, render<https://docs.djangoproject.com/en/dev/ref/templates/api/#rendering-a-context>your HTML 2. Use this library <https://pypi.python.org/pypi/odt2html.py/1.1> (or something similar) to convert it to ODT 3. Return a Response that includes the ODT as the content and the set the proper content-type <http://www.freeformatter.com/mime-types-list.html> On Fri, Nov 22, 2013 at 11:13 AM, Tom Lockhart <[email protected]>wrote: > > On 2013-11-21, at 9:34 PM, Harjot Mann <[email protected]> wrote: > > > I want to save my html django templates to odt file. Is there any way > > to do this? > > Not sure what you actually want to do. If you are trying to capture your > final html, you might be able to script something, possibly with selenium, > to generate the page and then send it to Libre Office as a batch job: > > > http://stackoverflow.com/questions/16202103/how-to-open-file-in-libre-office-and-save-this-like-doc-file > > hth > > - Tom > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > To post to this group, send email to [email protected]. > Visit this group at http://groups.google.com/group/django-users. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-users/4082C55B-E4DC-425A-A239-5BC11B652042%40gmail.com > . > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAPbEHsf%2B%2BS3k%3DwE6cV0CoVjdmADo7z%3Da0_NNxzM%2B_PA%2B_0y%3DHg%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.

