示例#1
0
def render_kajiki(template=None, info=None, format=None, fragment=False, mapping=None):
    global kajiki_loader
    if kajiki_loader is None:
        # Lazy imports of Kajiki
        from kajiki import PackageLoader
        kajiki_loader = PackageLoader()
            
    Template = kajiki_loader.import_(template)
       
    context = Bunch()
    context.update(stdvars())
    context.update(info)

    templ = Template(context)
    return templ.render()
示例#2
0
文件: test_xml.py 项目: ollyc/kajiki
 def test_pkg_loader(self):
     loader = PackageLoader()
     loader.import_('kajiki.tests.data.debug')