diff piecrust/dataproviders/base.py @ 857:d231a10d18f9

refactor: Make the data providers and blog archives source functional. Also, because of a behaviour change in Jinja, the blog archives sources is now offering monthly archives by itself.
author Ludovic Chabant <ludovic@chabant.com>
date Thu, 08 Jun 2017 08:49:33 -0700
parents 08e02c2a2a1a
children
line wrap: on
line diff
--- a/piecrust/dataproviders/base.py	Tue Jun 06 01:23:25 2017 -0700
+++ b/piecrust/dataproviders/base.py	Thu Jun 08 08:49:33 2017 -0700
@@ -10,10 +10,9 @@
     debug_render_invoke_dynamic = []
 
     def __init__(self, source, page):
+        self._sources = [source]
         self._page = page
-        self._sources = []
-        if source is not None:
-            self._sources.append(source)
+        self._app = source.app
 
     def _addSource(self, source):
         self._sources.append(source)