You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
536 B
20 lines
536 B
from flask import render_template |
|
from app import db |
|
from app.errors import bp |
|
|
|
@bp.app_errorhandler(403) |
|
def forbidden_error(error): |
|
return render_template('errors/403.html'), 403 |
|
|
|
@bp.app_errorhandler(404) |
|
def not_found_error(error): |
|
return render_template('errors/404.html'), 404 |
|
|
|
@bp.app_errorhandler(405) |
|
def method_not_allowed_error(error): |
|
return render_template('errors/405.html'), 405 |
|
|
|
@bp.app_errorhandler(500) |
|
def internal_error(error): |
|
db.session.rollback() |
|
return render_template('errors/500.html'), 500 |