comparison main.py @ 14:53c7a99cabae

Set log level to debug if config["DEBUG"] is set
author Björn Ricks <bjoern.ricks@intevation.de>
date Fri, 26 Sep 2014 20:18:16 +0200
parents 7f546e8a6e7a
children c289263e1b24
comparison
equal deleted inserted replaced
13:75d90af41dfa 14:53c7a99cabae
1 # -*- coding: utf-8 -*- 1 # -*- coding: utf-8 -*-
2 import logging
2 3
3 from flask import Flask 4 from flask import Flask
4
5 from odfcast.convert import ConvertView, TemplateConvertView
6 5
7 app = Flask(__name__) 6 app = Flask(__name__)
8 app.config.from_object('odfcast.settings') 7 app.config.from_object('odfcast.settings')
9 app.config.from_envvar('ODFCAST_SETTINGS', silent=True) 8 app.config.from_envvar('ODFCAST_SETTINGS', silent=True)
9
10 if app.config["DEBUG"]:
11 logging.basicConfig(level=logging.DEBUG)
12
13 from odfcast.convert import ConvertView, TemplateConvertView
10 14
11 15
12 app.add_url_rule("/convert/", 16 app.add_url_rule("/convert/",
13 view_func=ConvertView.as_view( 17 view_func=ConvertView.as_view(
14 "convert", 18 "convert",
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)