Mercurial > piecrust2
comparison piecrust/serving/server.py @ 862:fddaf43424e2
refactor: Get the page assets to work again in the server.
author | Ludovic Chabant <ludovic@chabant.com> |
---|---|
date | Thu, 08 Jun 2017 23:09:34 -0700 |
parents | 08e02c2a2a1a |
children | 33a89139c284 |
comparison
equal
deleted
inserted
replaced
861:d214918d4d2c | 862:fddaf43424e2 |
---|---|
105 if (app.config.get('site/enable_debug_info') and | 105 if (app.config.get('site/enable_debug_info') and |
106 self.enable_debug_info and | 106 self.enable_debug_info and |
107 '!debug' in request.args): | 107 '!debug' in request.args): |
108 app.config.set('site/show_debug_info', True) | 108 app.config.set('site/show_debug_info', True) |
109 | 109 |
110 # We'll serve page assets directly from where they are. | |
111 app.config.set('site/asset_url_format', | |
112 self.root_url + '_asset/%path%') | |
113 | |
114 # Let's try to serve a page. | 110 # Let's try to serve a page. |
115 try: | 111 try: |
116 response = self._try_serve_page(app, environ, request) | 112 response = self._try_serve_page(app, environ, request) |
117 return response | 113 return response |
118 except (RouteNotFoundError, SourceNotFoundError) as ex: | 114 except (RouteNotFoundError, SourceNotFoundError) as ex: |