예제 #1
0
    def __call__(self, value, system):
        """ Call the renderer implementation with the value
        and the system value passed in as arguments and return
        the result (a string or unicode object).  The value is
        the return value of a view.  The system value is a
        dictionary containing available system values
        (e.g. view, context, and request). """

        if '%s' in self.info.name:
            minify = self.info.registry.settings.get('minify')
            self.info.name = self.info.name % minify
            system['renderer_name'] = self.info.renderer

        return zpt.renderer_factory(self.info)(value, system)
예제 #2
0
    def __call__(self, value, system):
        """ Call the renderer implementation with the value
        and the system value passed in as arguments and return
        the result (a string or unicode object).  The value is
        the return value of a view.  The system value is a
        dictionary containing available system values
        (e.g. view, context, and request). """

        if '%s' in self.info.name:
            minify = self.info.registry.settings.get('minify')
            self.info.name = self.info.name % minify
            system['renderer_name'] = self.info.renderer

        return zpt.renderer_factory(self.info)(value, system)
예제 #3
0
 def _callFUT(self, info):
     from pyramid_chameleon.zpt import renderer_factory
     return renderer_factory(info)
예제 #4
0
 def _callFUT(self, info):
     from pyramid_chameleon.zpt import renderer_factory
     return renderer_factory(info)