added debug flag

This commit is contained in:
Lynne Megido 2018-11-13 22:10:13 +10:00
부모 8928f691e1
커밋 2eb2a7701d
로그인 계정: lynnesbian
GPG 키 ID: FB7B970303ACE499
2개의 변경된 파일7개의 추가작업 그리고 3개의 파일을 삭제

파일 보기

@ -7,5 +7,6 @@
"dbname":"curiousgreg",
"min_time_between_checks":1,
"max_time_between_checks":60,
"base_uri":"http://localhost:5000"
"base_uri":"http://localhost:5000",
"debug":false
}

7
web.py
파일 보기

@ -90,9 +90,12 @@ def home():
return redirect(url_for('main'))
@app.route('/debug') #TODO: remove this before making the site live ;p
@app.route('/debug')
def print_debug_info():
return json.dumps(session._get_current_object())
if cfg['debug']:
return json.dumps(session._get_current_object())
else:
return redirect('/home')
@app.route('/logout')
def reset_session():