from flask import Blueprint, render_template import iot.theme as theme errors = Blueprint('errors', __name__, template_folder='templates') @errors.app_errorhandler(403) def error_403(error): return render_template('errors/403.html', theme=theme), 403