app.config.parse_file('%s/config/facetracker.conf' % os.path.dirname(os.path.dirname(os.path.dirname(os.path.realpath(__file__)))))
before app.run()
and it worked... I'd like default values in the project that can be superseded by the values in system and user configurations.
load()
function is called durint app.setup()
… so, you shouldn’t expect things to be ready to use in load()
post_setup
or pre_run
hook
app.reload()
which could be called after if -c
was passed. I would start by trying to add a pre_run
hook that looks for -c
and if passed, do app.config.parse_file()
(that file), then app.reload()
… but there are plenty of logistical issues that might arrise.