Exemple #1
0
 def __call__(self, info):
     # if the template exists in the theme, we will use it instead of the
     # original template
     theme_path = getattr(self, 'theme_path', None)
     if theme_path:
         theme_file = os.path.join(theme_path, info.name)
         if os.path.exists(theme_file):
             info.name = theme_file
     return ChameleonRendererLookup.__call__(self, info)
Exemple #2
0
 def _makeOne(self, impl):
     from pyramid_chameleon.renderer import ChameleonRendererLookup
     return ChameleonRendererLookup(impl, self.config.registry)