comparison main.py @ 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 c289263e1b24
children 9d65de2ebe22
comparison
equal deleted inserted replaced
22:0e40926735e1 23:709edf15f90e
8 app.config.from_envvar('ODFCAST_SETTINGS', silent=True) 8 app.config.from_envvar('ODFCAST_SETTINGS', silent=True)
9 9
10 if app.config["DEBUG"]: 10 if app.config["DEBUG"]:
11 logging.basicConfig(level=logging.DEBUG) 11 logging.basicConfig(level=logging.DEBUG)
12 12
13 from odfcast.convert import ConvertView, TemplateConvertView, MergeView 13 from odfcast.convert import ConvertView, TemplateConvertView, MergeView, \
14 TemplateView
14 15
15 16
16 app.add_url_rule("/convert/", 17 app.add_url_rule("/convert/",
17 view_func=ConvertView.as_view( 18 view_func=ConvertView.as_view(
18 "convert", 19 "convert",
28 app.config["PY3O_UNO_SERVER_PORT"], 29 app.config["PY3O_UNO_SERVER_PORT"],
29 )) 30 ))
30 app.add_url_rule("/merge/", 31 app.add_url_rule("/merge/",
31 view_func=MergeView.as_view("merge"), 32 view_func=MergeView.as_view("merge"),
32 ) 33 )
34 app.add_url_rule("/",
35 view_func=TemplateView.as_view("index", "index.html"),
36 )
37
33 38
34 if __name__ == "__main__": 39 if __name__ == "__main__":
35 app.run() 40 app.run()
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)