Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
converse.js
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
converse.js
Commits
ab3c2ed8
Commit
ab3c2ed8
authored
Oct 23, 2014
by
Weblate
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/master'
parents
c2beca72
1984c855
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
17 deletions
+18
-17
weblate/accounts/pipeline.py
weblate/accounts/pipeline.py
+2
-1
weblate/accounts/views.py
weblate/accounts/views.py
+16
-16
No files found.
weblate/accounts/pipeline.py
View file @
ab3c2ed8
...
@@ -29,7 +29,8 @@ from weblate import appsettings
...
@@ -29,7 +29,8 @@ from weblate import appsettings
@
partial
@
partial
def
require_email
(
strategy
,
backend
,
details
,
user
=
None
,
is_new
=
False
,
**
kwargs
):
def
require_email
(
strategy
,
backend
,
details
,
user
=
None
,
is_new
=
False
,
**
kwargs
):
'''
'''
Forces entering email for backends which don't provide it.
Forces entering email for backends which don't provide it.
'''
'''
...
...
weblate/accounts/views.py
View file @
ab3c2ed8
...
@@ -32,9 +32,11 @@ from django.contrib.auth.models import User
...
@@ -32,9 +32,11 @@ from django.contrib.auth.models import User
from
django.contrib.auth
import
views
as
auth_views
from
django.contrib.auth
import
views
as
auth_views
from
django.views.generic
import
TemplateView
from
django.views.generic
import
TemplateView
try
:
try
:
# Not supported in Django 1.6
# pylint: disable=E0611
from
django.contrib.auth
import
update_session_auth_hash
from
django.contrib.auth
import
update_session_auth_hash
except
ImportError
:
except
ImportError
:
update_session_auth_hash
update_session_auth_hash
=
None
from
urllib
import
urlencode
from
urllib
import
urlencode
from
weblate.accounts.forms
import
(
from
weblate.accounts.forms
import
(
...
@@ -455,23 +457,21 @@ def password(request):
...
@@ -455,23 +457,21 @@ def password(request):
do_change
=
False
do_change
=
False
if
request
.
user
.
has_usable_password
():
if
not
request
.
user
.
has_usable_password
():
if
request
.
method
==
'POST'
:
change_form
=
PasswordChangeForm
(
request
.
POST
)
if
change_form
.
is_valid
():
cur_password
=
change_form
.
cleaned_data
[
'password'
]
if
request
.
user
.
check_password
(
cur_password
):
do_change
=
True
else
:
messages
.
error
(
request
,
_
(
'You have entered an invalid password.'
)
)
else
:
change_form
=
PasswordChangeForm
()
else
:
do_change
=
True
do_change
=
True
change_form
=
None
change_form
=
None
elif
request
.
method
==
'POST'
:
change_form
=
PasswordChangeForm
(
request
.
POST
)
if
change_form
.
is_valid
():
cur_password
=
change_form
.
cleaned_data
[
'password'
]
do_change
=
request
.
user
.
check_password
(
cur_password
)
if
not
do_change
:
messages
.
error
(
request
,
_
(
'You have entered an invalid password.'
)
)
else
:
change_form
=
PasswordChangeForm
()
if
request
.
method
==
'POST'
:
if
request
.
method
==
'POST'
:
form
=
PasswordForm
(
request
.
POST
)
form
=
PasswordForm
(
request
.
POST
)
...
...
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