comparison piecrust/serving.py @ 174:e9a3d405e18f

serve: Always force render the page being previewed. This is because if the page hasn't changed, but it includes pages that did change, it will re-use the cache and the user will preview the old version.
author Ludovic Chabant <ludovic@chabant.com>
date Sat, 03 Jan 2015 21:20:19 -0800
parents 0a86a7a6b284
children d47d9493bb0a
comparison
equal deleted inserted replaced
173:0a86a7a6b284 174:e9a3d405e18f
275 (req_path, [r.source_name for r, _ in routes])) 275 (req_path, [r.source_name for r, _ in routes]))
276 276
277 # Build the page. 277 # Build the page.
278 fac = PageFactory(source, rel_path, fac_metadata) 278 fac = PageFactory(source, rel_path, fac_metadata)
279 page = fac.buildPage() 279 page = fac.buildPage()
280 render_ctx = PageRenderingContext(page, req_path, page_num) 280 # We force the rendering of the page because it could not have
281 # changed, but include pages that did change.
282 render_ctx = PageRenderingContext(page, req_path, page_num,
283 force_render=True)
281 if taxonomy is not None: 284 if taxonomy is not None:
282 flt = PaginationFilter() 285 flt = PaginationFilter()
283 if taxonomy.is_multiple: 286 if taxonomy.is_multiple:
284 flt.addClause(HasFilterClause(taxonomy.name, term_value)) 287 flt.addClause(HasFilterClause(taxonomy.name, term_value))
285 else: 288 else: