【发布时间】:2012-09-27 22:36:55
【问题描述】:
可以为蓝图设置error_handler吗?
@blueprint.errorhandler(404)
def page_not_found(error):
return 'This page does not exist', 404
编辑:
https://github.com/mitsuhiko/flask/blob/18413ed1bf08261acf6d40f8ba65a98ae586bb29/flask/blueprints.py
您可以指定应用范围和蓝图本地 error_handler
【问题讨论】:
标签: http-status-code-404 blueprint flask