Mercurial > piecrust2
changeset 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 | 63798c9e5a55 |
children | 0bdd938d6b9f |
files | piecrust/serving.py |
diffstat | 1 files changed, 2 insertions(+), 1 deletions(-) [+] |
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)