diff options
author | Alexander Sulfrian <alexander@sulfrian.net> | 2016-02-02 04:54:37 +0100 |
---|---|---|
committer | Alexander Sulfrian <alexander@sulfrian.net> | 2016-02-02 05:23:38 +0100 |
commit | 7a60befe0635bb72b4403d277587fef424768c4f (patch) | |
tree | 01bac2ca356fc99cc4a273286f22163696d792fd /accounts/views | |
parent | bb9a6c6a384e02364e4eb10ef560b4fd4f05e5f0 (diff) | |
download | web-7a60befe0635bb72b4403d277587fef424768c4f.tar.gz web-7a60befe0635bb72b4403d277587fef424768c4f.tar.bz2 web-7a60befe0635bb72b4403d277587fef424768c4f.zip |
Code style
Diffstat (limited to 'accounts/views')
-rw-r--r-- | accounts/views/default/__init__.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/accounts/views/default/__init__.py b/accounts/views/default/__init__.py index a3e6c0e..68938c1 100644 --- a/accounts/views/default/__init__.py +++ b/accounts/views/default/__init__.py @@ -3,12 +3,14 @@ from __future__ import absolute_import from copy import deepcopy from flask import Blueprint -from flask import current_app, redirect, request, g, flash, url_for +from flask import current_app, redirect, render_template, request, g, \ + flash, url_for from flask.ext.login import login_required, login_user, logout_user, current_user +from werkzeug.exceptions import Forbidden from accounts.forms import RegisterForm, RegisterCompleteForm, \ LostPasswordForm, SettingsForm -from accounts.utils import * +from accounts.utils import templated from accounts.utils.confirmation import Confirmation from accounts.utils.login import logout_required from accounts.models import Account @@ -53,8 +55,6 @@ def register_complete(token): form = RegisterCompleteForm() if form.validate_on_submit(): - password = form.password.data - user = Account(username, mail, password=form.password.data) current_app.user_backend.register(user) login_user(user) @@ -128,7 +128,7 @@ def index(): if request.form.get('submit_services'): for service in current_app.all_services: field = form.get_servicedelete(service.id) - if(field.data): + if field.data: current_user.reset_password(service.id) changed = True |