diff foodtruck/main.py @ 772:3885421c29a3

admin: Make the whole FoodTruck site into a blueprint. This makes it possible to use an app factory, which makes it easier to write unit tests.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 03 Jul 2016 07:54:54 -0700
parents 200c7063affa
children
line wrap: on
line diff
--- a/foodtruck/main.py	Sun Jul 03 07:53:17 2016 -0700
+++ b/foodtruck/main.py	Sun Jul 03 07:54:54 2016 -0700
@@ -9,8 +9,9 @@
         import foodtruck.settings
         foodtruck.settings.DEBUG = debug
 
-    from .web import app
+    from .web import create_foodtruck_app
     try:
+        app = create_foodtruck_app()
         app.run(host=host, port=port, debug=debug, threaded=True)
     except SystemExit:
         # This is needed for Werkzeug's code reloader to be able to correctly