Change 'index' into 'entries'.

This commit is contained in:
Alexis Lahouze 2015-07-10 11:49:42 +02:00
parent 38e5154536
commit bc933f77f9

View File

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