If user is logged in and visits / /sign-in or /register they will

be redirected to choose service.
This commit is contained in:
Adam Shimali
2016-01-22 17:24:14 +00:00
parent f11f50b4a5
commit f8fc8e951a
6 changed files with 110 additions and 49 deletions

View File

@@ -1,10 +1,14 @@
from flask import render_template
from flask import render_template, url_for, redirect
from app.main import main
from flask_login import login_required
from flask.ext.login import current_user
@main.route('/')
def index():
if current_user and current_user.is_authenticated():
return redirect(url_for('main.choose_service'))
return render_template('views/signedout.html')