comparison piecrust/serving.py @ 256:da5e6e00fb41

bake/serve: Make previewed and baked URLs consistent. The preview server now handles the `pretty_urls` setting correctly instead of forcing it. The `trailing_slash` and `pagination_suffix` setting are also doing the same between the 2 systems.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 22 Feb 2015 22:01:58 -0800
parents c1d4e86a3918
children 7ec06ec14247
comparison
equal deleted inserted replaced
250:311447fe3dd0 256:da5e6e00fb41
128 return response(environ, start_response) 128 return response(environ, start_response)
129 129
130 # Create the app for this request. 130 # Create the app for this request.
131 app = PieCrust(root_dir=self.root_dir, debug=self.debug) 131 app = PieCrust(root_dir=self.root_dir, debug=self.debug)
132 app.config.set('site/root', '/') 132 app.config.set('site/root', '/')
133 app.config.set('site/pretty_urls', True)
134 app.config.set('server/is_serving', True) 133 app.config.set('server/is_serving', True)
135 if (app.config.get('site/enable_debug_info') and 134 if (app.config.get('site/enable_debug_info') and
136 '!debug' in request.args): 135 '!debug' in request.args):
137 app.config.set('site/show_debug_info', True) 136 app.config.set('site/show_debug_info', True)
138 137