diff piecrust/page.py @ 991:1857dbd4580f

bake: Fix bugs introduced by bake optimizations, of course. - Make the execution stats JSON-serializable. - Re-add ability to differentiate between sources used during segment rendering and during layout rendering. Fixes problems with cache invalidation of pages that use other sources. - Make taxonomy-related stuff JSON-serializable.
author Ludovic Chabant <ludovic@chabant.com>
date Mon, 20 Nov 2017 23:06:47 -0800
parents 45ad976712ec
children 2e5c5d33d62c
line wrap: on
line diff
--- a/piecrust/page.py	Sun Nov 19 14:29:52 2017 -0800
+++ b/piecrust/page.py	Mon Nov 20 23:06:47 2017 -0800
@@ -106,6 +106,10 @@
     def datetime(self, value):
         self._datetime = value
 
+    @property
+    def was_modified(self):
+        return (self._flags & FLAG_RAW_CACHE_VALID) == 0
+
     def getUri(self, sub_num=1):
         route_params = self.source_metadata['route_params']
         return self.route.getUri(route_params, sub_num=sub_num)