view odfcast/__init__.py @ 92:2200ae1e7bdb

Rename html_error_code to http_error_code The new name is obviously what the parameter actually specifies. Not least because there is no such thing as an HTML error code.
author Bernhard Herzog <bh@intevation.de>
date Fri, 28 Apr 2017 19:03:36 +0200
parents 02efda1f6919
children
line wrap: on
line source
# -*- coding: utf-8 -*-

import logging

from flask import Flask

app = Flask(__name__)
app.config.from_object('odfcast.settings')
app.config.from_pyfile('odfcast.ini', silent=True)
app.config.from_envvar('ODFCAST_SETTINGS', silent=True)

if app.config["DEBUG"]:
    logging.basicConfig(level=logging.DEBUG)

from odfcast.convert import ConvertView, MergeView, CheckView, TemplateView


app.add_url_rule("/convert/",
                 view_func=ConvertView.as_view(
                     "convert",
                     app.config["PY3O_UNO_DRIVER"],
                     app.config["PY3O_UNO_SERVER_HOSTNAME"],
                     app.config["PY3O_UNO_SERVER_PORT"],
                 ))
app.add_url_rule("/merge/",
                 view_func=MergeView.as_view("merge"),
                 )
app.add_url_rule("/check/",
                 view_func=CheckView.as_view("check"),
                 )
app.add_url_rule("/",
                 view_func=TemplateView.as_view("index", "index.html"),
                 )
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)