utils.py 文件源码

python
阅读 17 收藏 0 点赞 0 评论 0

项目:maps4all-signup 作者: hack4impact 项目源码 文件源码
def register_template_utils(app):
    """Register Jinja 2 helpers (called from __init__.py)."""

    @app.template_test()
    def equalto(value, other):
        return value == other

    @app.template_global()
    def is_hidden_field(field):
        from wtforms.fields import HiddenField
        return isinstance(field, HiddenField)

    app.add_template_global(index_for_role)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号