Mercurial > odfcast > odfcast
comparison main.py @ 30:9d65de2ebe22
Merge TemplateConvertView into ConvertView
Also improve temporary file handling.
author | Björn Ricks <bjoern.ricks@intevation.de> |
---|---|
date | Thu, 16 Oct 2014 10:34:43 +0200 |
parents | 709edf15f90e |
children | 5c3aba401382 |
comparison
equal
deleted
inserted
replaced
29:1dadc59c4b9a | 30:9d65de2ebe22 |
---|---|
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, MergeView, TemplateView |
14 TemplateView | |
15 | 14 |
16 | 15 |
17 app.add_url_rule("/convert/", | 16 app.add_url_rule("/convert/", |
18 view_func=ConvertView.as_view( | 17 view_func=ConvertView.as_view( |
19 "convert", | 18 "convert", |
20 app.config["PY3O_UNO_DRIVER"], | |
21 app.config["PY3O_UNO_SERVER_HOSTNAME"], | |
22 app.config["PY3O_UNO_SERVER_PORT"], | |
23 )) | |
24 app.add_url_rule("/template/", | |
25 view_func=TemplateConvertView.as_view( | |
26 "template", | |
27 app.config["PY3O_UNO_DRIVER"], | 19 app.config["PY3O_UNO_DRIVER"], |
28 app.config["PY3O_UNO_SERVER_HOSTNAME"], | 20 app.config["PY3O_UNO_SERVER_HOSTNAME"], |
29 app.config["PY3O_UNO_SERVER_PORT"], | 21 app.config["PY3O_UNO_SERVER_PORT"], |
30 )) | 22 )) |
31 app.add_url_rule("/merge/", | 23 app.add_url_rule("/merge/", |