Пример #1
0
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