diff options
author | florent <florent.pigout@gmail.com> | 2011-08-28 00:01:26 (GMT) |
---|---|---|
committer | florent <florent.pigout@gmail.com> | 2011-08-28 00:01:26 (GMT) |
commit | b427000afab6b1e64015591f2fed1ba56ce81b99 (patch) | |
tree | 1d64ffafbf906e74e8c91c2f855b435db6d79c63 | |
parent | 1ed5c27368c76eec33c03fed6ea6d837dc567776 (diff) |
enhance config management
-rw-r--r-- | config.ini | 8 | ||||
-rw-r--r-- | lib/server/flask/_app.py | 3 |
2 files changed, 10 insertions, 1 deletions
@@ -1,2 +1,10 @@ [activity] name = nutriweb +# ... +debug = True +# ... +use-toolbar = True + +[server] +# ... +port = 8008 diff --git a/lib/server/flask/_app.py b/lib/server/flask/_app.py index 995c532..89d9cb4 100644 --- a/lib/server/flask/_app.py +++ b/lib/server/flask/_app.py @@ -14,6 +14,7 @@ APP_NAME = 'my_activity' if APP_NAME is None else APP_NAME # get app config values _debug = config.Config().get('server>debug') _key = config.Config().get('server>secret_key') +_port = config.Config().get('server>port', type_=int) # flask import import flask @@ -54,7 +55,7 @@ except Exception: def run_app(): """run method to trigger at from python class. """ - app.run() + app.run(port=_port) def render(template, **context): |