changeset 746:0fdf1e43bf92

data: Make the blog provider give usable data to the year archive routes.
author Ludovic Chabant <ludovic@chabant.com>
date Sun, 05 Jun 2016 00:01:40 -0700
parents 0b4eb0e37363
children 5336e146ac8d
files piecrust/data/provider.py
diffstat 1 files changed, 3 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/piecrust/data/provider.py	Sun Jun 05 00:00:44 2016 -0700
+++ b/piecrust/data/provider.py	Sun Jun 05 00:01:40 2016 -0700
@@ -204,6 +204,9 @@
     def __str__(self):
         return self.name
 
+    def __int__(self):
+        return int(self.name)
+
     @property
     def posts(self):
         self._load()