Mercurial > piecrust2
comparison piecrust/serving/util.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 | 01458d3b646b |
comparison
equal
deleted
inserted
replaced
861:d214918d4d2c | 862:fddaf43424e2 |
---|---|
15 | 15 |
16 def get_app_for_server(appfactory, root_url='/'): | 16 def get_app_for_server(appfactory, root_url='/'): |
17 app = appfactory.create() | 17 app = appfactory.create() |
18 app.config.set('site/root', root_url) | 18 app.config.set('site/root', root_url) |
19 app.config.set('server/is_serving', True) | 19 app.config.set('server/is_serving', True) |
20 # We'll serve page assets directly from where they are. | |
21 app.config.set('site/asset_url_format', root_url + '_asset/%path%') | |
20 return app | 22 return app |
21 | 23 |
22 | 24 |
23 class RequestedPage(object): | 25 class RequestedPage(object): |
24 def __init__(self): | 26 def __init__(self): |