diff main.py @ 6:7f546e8a6e7a

Add url mapping for TemplateConvertView
author Björn Ricks <bjoern.ricks@intevation.de>
date Fri, 26 Sep 2014 15:36:30 +0200
parents 4a34f72f036b
children 53c7a99cabae
line wrap: on
line diff
--- a/main.py	Fri Sep 26 15:35:48 2014 +0200
+++ b/main.py	Fri Sep 26 15:36:30 2014 +0200
@@ -2,7 +2,7 @@
 
 from flask import Flask
 
-from odfcast.convert import ConvertView
+from odfcast.convert import ConvertView, TemplateConvertView
 
 app = Flask(__name__)
 app.config.from_object('odfcast.settings')
@@ -16,6 +16,13 @@
                      app.config["PY3O_UNO_SERVER_HOSTNAME"],
                      app.config["PY3O_UNO_SERVER_PORT"],
                  ))
+app.add_url_rule("/template/",
+                 view_func=TemplateConvertView.as_view(
+                     "template",
+                     app.config["PY3O_UNO_DRIVER"],
+                     app.config["PY3O_UNO_SERVER_HOSTNAME"],
+                     app.config["PY3O_UNO_SERVER_PORT"],
+                 ))
 
 if __name__ == "__main__":
     app.run()
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)