comparison piecrust/sources/base.py @ 855:448710d84121

refactor: Get the taxonomy support back to a functional state. There's now a taxonomy content source that wraps another normal content source like a blog posts' source. It works in tandem with a taxonomy content pipeline that will do the heavy lifting of figuring out what kind of terms exist and need to be baked.
author Ludovic Chabant <ludovic@chabant.com>
date Tue, 06 Jun 2017 00:26:21 -0700
parents 08e02c2a2a1a
children fddaf43424e2
comparison
equal deleted inserted replaced
854:08e02c2a2a1a 855:448710d84121
87 87
88 @property 88 @property
89 def is_theme_source(self): 89 def is_theme_source(self):
90 return self.config['realm'] == REALM_THEME 90 return self.config['realm'] == REALM_THEME
91 91
92 @property
93 def root_dir(self):
94 if self.is_theme_source:
95 return self.app.theme_dir
96 return self.app.root_dir
97
98 @cached_property 92 @cached_property
99 def route(self): 93 def route(self):
100 return self.app.getSourceRoute(self.name) 94 return self.app.getSourceRoute(self.name)
101 95
102 def openItem(self, item, mode='r', **kwargs): 96 def openItem(self, item, mode='r', **kwargs):