comparison piecrust/serving.py @ 338:938be93215cb

bake: Improve render context and bake record, fix incremental bake bugs. * Used sources and taxonomies are now stored on a per-render-pass basis. This fixes bugs where sources/taxonomies were used for one pass, but that pass is skipped on a later bake because its result is cached. * Bake records are now created for all pages even when they're not baked. Record collapsing is gone except for taxonomy index pages. * Bake records now also have sub-entries in order to store information about each sub-page, since some sub-pages could use sources/taxonomies differently than others, or be missing from the output. This lets PieCrust handle clean/dirty states on a sub-page level.
author Ludovic Chabant <ludovic@chabant.com>
date Mon, 06 Apr 2015 19:59:54 -0700
parents b034f6f15e22
children 741e97e63048
comparison
equal deleted inserted replaced
337:49408002798e 338:938be93215cb
283 raise NotFound(message) 283 raise NotFound(message)
284 284
285 if entry is None: 285 if entry is None:
286 entry = ServeRecordPageEntry(req_path, page_num) 286 entry = ServeRecordPageEntry(req_path, page_num)
287 self._page_record.addEntry(entry) 287 self._page_record.addEntry(entry)
288 entry.used_source_names = set(render_ctx.used_source_names) 288 rdr_pass = render_ctx.current_pass_info
289 entry.used_source_names = set(rdr_pass.used_source_names)
289 290
290 # Profiling. 291 # Profiling.
291 if app.config.get('site/show_debug_info'): 292 if app.config.get('site/show_debug_info'):
292 now_time = time.clock() 293 now_time = time.clock()
293 timing_info = ('%8.1f ms' % 294 timing_info = ('%8.1f ms' %