示例#1
0
文件: jinja.py 项目: nmaludy/orquesta
def register_functions(env):
    catalog = func_base.load()

    for name, func in six.iteritems(catalog):
        env.filters[name] = func

    return catalog
示例#2
0
def register_functions(ctx):
    catalog = func_base.load()

    for name, func in six.iteritems(catalog):
        ctx.register_function(func, name=name)

    return catalog