from flask import Blueprint, redirect, render_template, jsonify frontend = Blueprint('frontend', __name__, template_folder='templates', static_folder='static') @frontend.route('/') def root(): return redirect('index.html') @frontend.route('/index.html') def index(): return render_template('index.html') @frontend.route('/scheduler.html') def scheduler(): return render_template('scheduler.html') @frontend.errorhandler(BaseException) def default_errorhandler(error): return jsonify(title="Error", text="Error %s" % str(error)), 500