summaryrefslogtreecommitdiffstats
path: root/accounts/views/login/__init__.py
diff options
context:
space:
mode:
Diffstat (limited to 'accounts/views/login/__init__.py')
-rw-r--r--accounts/views/login/__init__.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/accounts/views/login/__init__.py b/accounts/views/login/__init__.py
index 3950cf9..7371f84 100644
--- a/accounts/views/login/__init__.py
+++ b/accounts/views/login/__init__.py
@@ -1,10 +1,10 @@
# -*- coding: utf-8 -*-
-from __future__ import absolute_import
+
from flask import Blueprint
from flask import current_app, redirect, request, g, flash, render_template, url_for
from flask.ext.login import login_user, logout_user, current_user
-from urlparse import urljoin, urlparse
+from urllib.parse import urljoin, urlparse
from .forms import LoginForm
@@ -33,7 +33,7 @@ def login():
user = current_app.user_backend.auth(form.username.data,
form.password.data)
login_user(user)
- flash(u'Erfolgreich eingeloggt', 'success')
+ flash('Erfolgreich eingeloggt', 'success')
next = request.form['next']
if not is_safe_url(next):
@@ -41,7 +41,7 @@ def login():
return redirect(next or url_for('default.index'))
except (current_app.user_backend.NoSuchUserError,
current_app.user_backend.InvalidPasswordError):
- flash(u'Ungültiger Benutzername und/oder Passwort', 'error')
+ flash('Ungültiger Benutzername und/oder Passwort', 'error')
return render_template("login/login.html", form=form,
next=request.values.get('next'))
@@ -50,5 +50,5 @@ def login():
@bp.route('/logout')
def logout():
logout_user()
- flash(u'Erfolgreich ausgeloggt.', 'success')
+ flash('Erfolgreich ausgeloggt.', 'success')
return redirect(url_for('.login'))