diff piecrust/records.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 c132a2cba521
children 61d606fbc313
line wrap: on
line diff
--- a/piecrust/records.py	Sat Apr 04 07:55:49 2015 -0700
+++ b/piecrust/records.py	Mon Apr 06 19:59:54 2015 -0700
@@ -118,6 +118,7 @@
         if te is None:
             logger.debug("Adding new record entry: %s" % key)
             self.transitions[key] = (None, entry)
+            self._onNewEntryAdded(entry)
             return
 
         if te[1] is not None:
@@ -126,3 +127,6 @@
         logger.debug("Setting current record entry: %s" % key)
         self.transitions[key] = (te[0], entry)
 
+    def _onNewEntryAdded(self, entry):
+        pass
+