Mercurial > piecrust2
diff piecrust/serving.py @ 141:666ee97e77a9
Switch the PieCrust server to debug mode with `?!debug` in the URL.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Sat, 29 Nov 2014 18:29:19 -0800 |
parents | 1d8de8a349be |
children | 70b86e904b85 |
line wrap: on
line diff
--- a/piecrust/serving.py Sat Nov 29 15:33:26 2014 -0800 +++ b/piecrust/serving.py Sat Nov 29 18:29:19 2014 -0800 @@ -107,7 +107,8 @@ raise MethodNotAllowed() # Create the app for this request. - app = PieCrust(root_dir=self.root_dir, debug=self.debug) + rq_debug = ('!debug' in request.args) + app = PieCrust(root_dir=self.root_dir, debug=(self.debug or rq_debug)) app.config.set('site/root', '/') app.config.set('site/pretty_urls', True) app.config.set('server/is_serving', True)