changeset 23:709edf15f90e

Add a index view to display links to the three functions
author Björn Ricks <bjoern.ricks@intevation.de>
date Mon, 29 Sep 2014 16:07:49 +0200
parents 0e40926735e1
children e9d8a38b0e9e
files main.py templates/index.html
diffstat 2 files changed, 21 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/main.py	Mon Sep 29 16:07:25 2014 +0200
+++ b/main.py	Mon Sep 29 16:07:49 2014 +0200
@@ -10,7 +10,8 @@
 if app.config["DEBUG"]:
     logging.basicConfig(level=logging.DEBUG)
 
-from odfcast.convert import ConvertView, TemplateConvertView, MergeView
+from odfcast.convert import ConvertView, TemplateConvertView, MergeView, \
+    TemplateView
 
 
 app.add_url_rule("/convert/",
@@ -30,6 +31,10 @@
 app.add_url_rule("/merge/",
                  view_func=MergeView.as_view("merge"),
                  )
+app.add_url_rule("/",
+                 view_func=TemplateView.as_view("index", "index.html"),
+                 )
+
 
 if __name__ == "__main__":
     app.run()
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/templates/index.html	Mon Sep 29 16:07:49 2014 +0200
@@ -0,0 +1,15 @@
+{% extends 'base.html' %}
+
+{% block content %}
+<ul>
+    <li>
+    <a href="/convert/">Convert</a>
+    </li>
+    <li>
+    <a href="/template/">Template</a>
+    </li>
+    <li>
+    <a href="/merge/">Merge</a>
+    </li>
+</ul>
+{% endblock %}
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)