Mercurial > odfcast
comparison main.py @ 20:c289263e1b24
Add url rule for new MergeView
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Mon, 29 Sep 2014 15:59:56 +0200 |
parents | 53c7a99cabae |
children | 709edf15f90e |
comparison
equal
deleted
inserted
replaced
19:2f627039d2b4 | 20:c289263e1b24 |
---|---|
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 | 13 from odfcast.convert import ConvertView, TemplateConvertView, MergeView |
14 | 14 |
15 | 15 |
16 app.add_url_rule("/convert/", | 16 app.add_url_rule("/convert/", |
17 view_func=ConvertView.as_view( | 17 view_func=ConvertView.as_view( |
18 "convert", | 18 "convert", |
25 "template", | 25 "template", |
26 app.config["PY3O_UNO_DRIVER"], | 26 app.config["PY3O_UNO_DRIVER"], |
27 app.config["PY3O_UNO_SERVER_HOSTNAME"], | 27 app.config["PY3O_UNO_SERVER_HOSTNAME"], |
28 app.config["PY3O_UNO_SERVER_PORT"], | 28 app.config["PY3O_UNO_SERVER_PORT"], |
29 )) | 29 )) |
30 app.add_url_rule("/merge/", | |
31 view_func=MergeView.as_view("merge"), | |
32 ) | |
30 | 33 |
31 if __name__ == "__main__": | 34 if __name__ == "__main__": |
32 app.run() | 35 app.run() |