class FormframeTemplateFactory(object): """Formframe template factory.""" def __init__(self, filename, contentType='text/html'): self.template = ViewPageTemplateFile(filename, content_type=contentType) def __call__(self, view, request): return self.template.__get__(view, None)
class ErrorstatusTemplateFactory(object): """Errorstatus template factory.""" def __init__(self, filename, contentType='text/html'): self.template = ViewPageTemplateFile(filename, content_type=contentType) def __call__(self, view, request): # FIXME - Return a bound template - not very pretty, but # I don't see another solution... return self.template.__get__(view, None)