comparison odfcast/__init__.py @ 49:4b78fe544b09

Allow overwriting settings via odfcast/odfcast.ini file With this ini file we can tweak the setting on different environments
author Björn Ricks <bjoern.ricks@intevation.de>
date Mon, 03 Nov 2014 11:51:03 +0100
parents 5c3aba401382
children 02efda1f6919
comparison
equal deleted inserted replaced
48:3bff1a4bc80e 49:4b78fe544b09
4 4
5 from flask import Flask 5 from flask import Flask
6 6
7 app = Flask(__name__) 7 app = Flask(__name__)
8 app.config.from_object('odfcast.settings') 8 app.config.from_object('odfcast.settings')
9 app.config.from_pyfile('odfcast.ini', silent=True)
9 app.config.from_envvar('ODFCAST_SETTINGS', silent=True) 10 app.config.from_envvar('ODFCAST_SETTINGS', silent=True)
10 11
11 if app.config["DEBUG"]: 12 if app.config["DEBUG"]:
12 logging.basicConfig(level=logging.DEBUG) 13 logging.basicConfig(level=logging.DEBUG)
13 14
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)