def __init__(self, extra_vars_func=None, options=None, template=""): self.log = logger(__name__, self) self.options = options self.template = template self.formatter = Formatter() """The template's formatter. The formatter performs the actual templating work and should have a :meth:`ptemplate.formatter.Formatter.format` method and a :attr:`ptemplate.formatter.Formatter.converters` dictionary. The converters dictionary will be updated with any converters specified in the Template. """ self.formatter.converters.update(self.converters)
def __init__(self, extra_vars_func=None, options=None, template=''): self.log = logger(__name__, self) self.options = options self.template = template self.formatter = Formatter() """The template's formatter. The formatter performs the actual templating work and should have a :meth:`ptemplate.formatter.Formatter.format` method and a :attr:`ptemplate.formatter.Formatter.converters` dictionary. The converters dictionary will be updated with any converters specified in the Template. """ self.formatter.converters.update(self.converters)
def __init__(self, *args, **kwargs): super(Formatter, self).__init__(*args, **kwargs) self.log = logger(__name__, self)
def __init__(self, *args, **kwargs): super(CTemplate, self).__init__(*args, **kwargs) self.log = logger(__name__, self)