diff foodtruck/main.py @ 599:d7baac1d01e6

admin: Set the `DEBUG` flag before the app runs so we can read it during setup.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 24 Jan 2016 10:40:55 -0800
parents b884bef3e611
children c6bc0ef03f82
line wrap: on
line diff
--- a/foodtruck/main.py	Fri Jan 22 11:01:00 2016 -0800
+++ b/foodtruck/main.py	Sun Jan 24 10:40:55 2016 -0800
@@ -5,6 +5,10 @@
 
 
 def run_foodtruck(debug=False):
+    if debug:
+        import foodtruck.settings
+        foodtruck.settings.DEBUG = debug
+
     from .web import app
     try:
         app.run(debug=debug, threaded=True)