diff piecrust/serving/middlewares.py @ 663:3ceeca7bb71c

themes: Add support for a `--theme` argument to `chef`.
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 01 Mar 2016 22:27:28 -0800
parents 93b656f0af54
children 81d9c3a3a0b5
line wrap: on
line diff
--- a/piecrust/serving/middlewares.py	Tue Mar 01 22:27:04 2016 -0800
+++ b/piecrust/serving/middlewares.py	Tue Mar 01 22:27:28 2016 -0800
@@ -40,11 +40,12 @@
 class PieCrustDebugMiddleware(object):
     """ WSGI middleware that handles debugging of PieCrust stuff.
     """
-    def __init__(self, app, root_dir, debug=False,
+    def __init__(self, app, root_dir, debug=False, theme_site=False,
                  sub_cache_dir=None, run_sse_check=None):
         self.app = app
         self.root_dir = root_dir
         self.debug = debug
+        self.theme_site = theme_site
         self.sub_cache_dir = sub_cache_dir
         self.run_sse_check = run_sse_check
         self._proc_loop = None
@@ -63,6 +64,7 @@
             # time so we let the implementation tell us if this is OK.
             from piecrust.serving.procloop import ProcessingLoop
             self._proc_loop = ProcessingLoop(root_dir, self._out_dir,
+                                             theme_site=theme_site,
                                              sub_cache_dir=sub_cache_dir,
                                              debug=debug)
             self._proc_loop.start()