diff piecrust/sources/base.py @ 826:7f235e65ef5d

Allow PageSource to provide a custom assetor
author Ben Artin <ben@artins.org>
date Sun, 01 Jan 2017 18:02:13 -0500
parents 58ebf50235a5
children a12ad254176e
line wrap: on
line diff
--- a/piecrust/sources/base.py	Tue Dec 20 22:20:18 2016 -0800
+++ b/piecrust/sources/base.py	Sun Jan 01 18:02:13 2017 -0500
@@ -3,6 +3,7 @@
 from werkzeug.utils import cached_property
 from piecrust.configuration import ConfigurationError
 from piecrust.page import Page
+from piecrust.data.assetor import Assetor
 
 
 REALM_USER = 0
@@ -136,3 +137,6 @@
 
         return self._provider_type(self, page, override)
 
+    def buildPageAssetor(self, page, uri):
+        return Assetor(page, uri)
+