# HG changeset patch # User Ludovic Chabant # Date 1417314559 28800 # Node ID 666ee97e77a9c13a5ff2af8b959b056539cffdc1 # Parent 63798c9e5a5549ee278ae2b2fcf69a2f8cdd1def Switch the PieCrust server to debug mode with `?!debug` in the URL. diff -r 63798c9e5a55 -r 666ee97e77a9 piecrust/serving.py --- 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)