示例#1
0
 def __call__(self, name, from_template=None, default_inherit=None):
     if base_config().template_dir:
         template_file = os.path.join(base_config().template_dir, name)
     else:
         template_file = pkg_resources.resource_filename(module_name, location + '/' + name)
     return Template.from_filename(template_file, namespace=namespace,
                                   default_inherit=default_inherit, get_template=self)
示例#2
0
 def __call__(self, name, from_template=None, default_inherit=None):
     template_file = pkg_resources.resource_filename(
         module_name, location + '/' + name)
     return Template.from_filename(template_file,
                                   namespace=namespace,
                                   default_inherit=default_inherit,
                                   get_template=self)
示例#3
0
 def __call__(self, name, from_template=None, default_inherit=None):
     if base_config().template_dir:
         template_file = os.path.join(base_config().template_dir, name)
     else:
         template_file = pkg_resources.resource_filename(module_name, location + '/' + name)
     return Template.from_filename(template_file, namespace=namespace, encoding='utf-8',
                                   default_inherit=default_inherit, get_template=self)
示例#4
0
 def __call__(self, name, from_template=None, default_inherit=None):
     return Template.from_filename(os.path.join(template_dir, name), namespace=namespace,
                                   default_inherit=default_inherit, get_template=self)