Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Marco Marinello
django-password-reset
Commits
22b0c0b2
Commit
22b0c0b2
authored
May 25, 2017
by
Tim Graham
Browse files
Fix E305 flake8 warnings
parent
71f05d34
Changes
2
Hide whitespace changes
Inline
Side-by-side
password_reset/tests/views.py
View file @
22b0c0b2
...
...
@@ -3,14 +3,20 @@ from .. import views
class
EmailRecover
(
views
.
Recover
):
search_fields
=
[
'email'
]
email_recover
=
EmailRecover
.
as_view
()
class
UsernameRecover
(
views
.
Recover
):
search_fields
=
[
'username'
]
username_recover
=
UsernameRecover
.
as_view
()
class
InsensitiveRecover
(
views
.
Recover
):
case_sensitive
=
False
insensitive_recover
=
InsensitiveRecover
.
as_view
()
password_reset/views.py
View file @
22b0c0b2
...
...
@@ -47,6 +47,8 @@ class RecoverDone(SaltMixin, generic.TemplateView):
except
signing
.
BadSignature
:
raise
Http404
return
ctx
recover_done
=
RecoverDone
.
as_view
()
...
...
@@ -106,6 +108,8 @@ class Recover(SaltMixin, generic.FormView):
email
=
self
.
user
.
email
self
.
mail_signature
=
signing
.
dumps
(
email
,
salt
=
self
.
url_salt
)
return
super
(
Recover
,
self
).
form_valid
(
form
)
recover
=
Recover
.
as_view
()
...
...
@@ -164,6 +168,8 @@ class Reset(SaltMixin, generic.FormView):
request
=
self
.
request
)
return
redirect
(
self
.
get_success_url
())
reset
=
Reset
.
as_view
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment