flask 0.11 compatibility
This commit is contained in:
parent
328f41b85c
commit
9ac015b3dd
5 changed files with 13 additions and 13 deletions
|
@ -12,7 +12,7 @@ blueprint = Blueprint('auth', __name__, template_folder='templates')
|
|||
@blueprint.route("/login", methods=['GET', 'POST'])
|
||||
def login():
|
||||
next_url = request.args.get('next') or url_for(current_app.config['ROOT_ENDPOINT'])
|
||||
if current_user.is_authenticated():
|
||||
if current_user.is_authenticated:
|
||||
return redirect(next_url)
|
||||
session['next_url'] = next_url
|
||||
return render_template("auth/login.html", forms=Auth.login_forms())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue