changeset 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 3cec8634209a
children c37307a72f79
files foodtruck/main.py
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
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)