diff odfcast/convert.py @ 16:f4920ab1d27c

Add basic html interface for convert This allow testing the code via the browser
author Björn Ricks <bjoern.ricks@intevation.de>
date Mon, 29 Sep 2014 14:02:55 +0200
parents 46f31348fe01
children 585904e7411a
line wrap: on
line diff
--- a/odfcast/convert.py	Fri Sep 26 20:18:35 2014 +0200
+++ b/odfcast/convert.py	Mon Sep 29 14:02:55 2014 +0200
@@ -2,7 +2,7 @@
 
 import tempfile
 
-from flask import request, Response, json
+from flask import request, Response, json, render_template
 from flask.views import MethodView
 
 from py3o.template import Template
@@ -45,6 +45,9 @@
         mimetype = self.get_mimetype_for_format(fformat)
         return Response(outfile, mimetype=mimetype)
 
+    def get(self):
+        return render_template("convert.html")
+
     def save_form_file(self, infile):
         outfile = tempfile.NamedTemporaryFile()
         infile.save(outfile.name)
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)