html to odt

56 views
Skip to first unread message

Harjot Mann

unread,
Nov 22, 2013, 12:34:06 AM11/22/13
to django...@googlegroups.com
I want to save my html django templates to odt file. Is there any way
to do this?
--
Harjot Kaur Mann
Blog: http://harjotmann.wordpress.com/
Daily Dairy: http://harjotmann.wordpress.com/daily-diary/

Tom Lockhart

unread,
Nov 22, 2013, 11:13:16 AM11/22/13
to django...@googlegroups.com

On 2013-11-21, at 9:34 PM, Harjot Mann <harjotm...@gmail.com> 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

Kurtis Mullins

unread,
Nov 22, 2013, 12:45:17 PM11/22/13
to django...@googlegroups.com
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 your HTML
2. Use this library (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



--
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 django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
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.

Reply all
Reply to author
Forward
0 new messages