added debug flag
This commit is contained in:
parent
8928f691e1
commit
2eb2a7701d
2 changed files with 7 additions and 3 deletions
|
@ -7,5 +7,6 @@
|
||||||
"dbname":"curiousgreg",
|
"dbname":"curiousgreg",
|
||||||
"min_time_between_checks":1,
|
"min_time_between_checks":1,
|
||||||
"max_time_between_checks":60,
|
"max_time_between_checks":60,
|
||||||
"base_uri":"http://localhost:5000"
|
"base_uri":"http://localhost:5000",
|
||||||
|
"debug":false
|
||||||
}
|
}
|
||||||
|
|
5
web.py
5
web.py
|
@ -90,9 +90,12 @@ def home():
|
||||||
return redirect(url_for('main'))
|
return redirect(url_for('main'))
|
||||||
|
|
||||||
|
|
||||||
@app.route('/debug') #TODO: remove this before making the site live ;p
|
@app.route('/debug')
|
||||||
def print_debug_info():
|
def print_debug_info():
|
||||||
|
if cfg['debug']:
|
||||||
return json.dumps(session._get_current_object())
|
return json.dumps(session._get_current_object())
|
||||||
|
else:
|
||||||
|
return redirect('/home')
|
||||||
|
|
||||||
@app.route('/logout')
|
@app.route('/logout')
|
||||||
def reset_session():
|
def reset_session():
|
||||||
|
|
Loading…
Reference in a new issue