diff --git a/frontend/__init__.py b/frontend/__init__.py new file mode 100644 index 0000000..308f2a0 --- /dev/null +++ b/frontend/__init__.py @@ -0,0 +1,19 @@ +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 diff --git a/frontend/templates/index.html b/frontend/templates/index.html index c23e948..d5c16ee 100644 --- a/frontend/templates/index.html +++ b/frontend/templates/index.html @@ -99,7 +99,7 @@