Browse Source

added debug flag

master
Lynne Megido 5 months ago
parent
commit
2eb2a7701d
Signed by: Lynne <thecoolone3@gmail.com> GPG Key ID: FB7B970303ACE499
2 changed files with 7 additions and 3 deletions
  1. 2
    1
      meta.sample.json
  2. 5
    2
      web.py

+ 2
- 1
meta.sample.json View File

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

+ 5
- 2
web.py View File

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

Loading…
Cancel
Save