# 需要导入模块: import flask [as 别名]# 或者: from flask importget_flashed_messages[as 别名]defjsonify(*args, **kwargs):messages = [{'message': m,'category':c}forc, minflask.get_flashed_messages(with_categories=True)]returnflask.jsonify(*args, flashed_messages=messages, **kwargs) 开发...
:param sep: separator for multiple messages """ifnotcategory:returnsep.join(get_flashed_messages())returnsep.join([mfork, minget_flashed_messages(with_categories=True)ifk == category]) 开发者ID:kofrasa,项目名称:flask-apputils,代码行数:9,代码来源:helpers.py 示例14: make_cache_key ▲点赞 ...
def common_bootstrap_payload() -> Dict[str, Any]: """Common data always sent to the client""" messages = get_flashed_messages(with_categories=True) locale = str(get_locale()) return { "flash_messages": messages, "conf": {k: conf.get(k) for k in FRONTEND_CONF_KEYS}, "locale"...