summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--app/views/user.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/app/views/user.py b/app/views/user.py
index 6102d3b..cb97136 100644
--- a/app/views/user.py
+++ b/app/views/user.py
@@ -16,6 +16,7 @@ mod = Blueprint('user', __name__)
class LoginForm(F.Form):
username = F.StringField(u'Username', F.req)
pwd = F.PasswordField(u'Passwort', F.req)
+ remember = F.BooleanField(u'Eingeloggt bleiben?')
def __init__(self, *args, **kwargs):
super(LoginForm, self).__init__(*args, **kwargs)
@@ -56,7 +57,7 @@ def login():
"""Log the user in."""
form = LoginForm(flash=u"Login fehlgeschlagen!")
if form.validate_on_submit():
- login_user(form.user)
+ login_user(form.user, remember=form.remember.data)
# we explicitly need flask's variant as we redirect to a URI
return flask.redirect(request.args.get('next') or url_for('index'))
return { 'form': form }