# HG changeset patch # User Ludovic Chabant # Date 1423026295 28800 # Node ID a75d024ee839d6326b557e756d21f057c6039eb5 # Parent 4f00bb99400ece5f44723abdafae0f97f36c6444 serve: Keep the `?!debug` when generating URLs if it is enabled. diff -r 4f00bb99400e -r a75d024ee839 piecrust/routing.py --- a/piecrust/routing.py Tue Feb 03 18:51:30 2015 -0800 +++ b/piecrust/routing.py Tue Feb 03 21:04:55 2015 -0800 @@ -26,6 +26,8 @@ self.uri_root = app.config.get('site/root').rstrip('/') + '/' self.uri_pattern = uri.lstrip('/') self.uri_format = route_re.sub(self._uriFormatRepl, self.uri_pattern) + if app.config.get('site/show_debug_info'): + self.uri_format += '?!debug' # Get the straight-forward regex for matching this URI pattern. p = route_re.sub(self._uriPatternRepl, self.uri_pattern) + '$'