Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix the problem password_reset_confirm #274

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion demo/templates/fragments/password_reset_confirm_form.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- Signup form -->
<form class="form-horizontal ajax-post" role="form" action="{% url 'rest_password_reset_confirm' %}">{% csrf_token %}
<form class="form-horizontal ajax-post" role="form" action="{% url 'password_reset_confirm' %}">{% csrf_token %}
<div class="form-group">
<label for="uid" class="col-sm-2 control-label">Uid</label>
<div class="col-sm-10">
Expand Down
4 changes: 2 additions & 2 deletions dj_rest_auth/tests/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,7 @@ def test_password_reset(self):
self.assertEqual(len(mail.outbox), mail_count + 1)

url_kwargs = self._generate_uid_and_token(user)
url = reverse('rest_password_reset_confirm')
url = reverse('password_reset_confirm')

# wrong token
data = {
Expand Down Expand Up @@ -349,7 +349,7 @@ def test_password_reset(self):
'uid': force_str(url_kwargs['uid']),
'token': url_kwargs['token'],
}
url = reverse('rest_password_reset_confirm')
url = reverse('password_reset_confirm')
self.post(url, data=data, status_code=200)

payload = {
Expand Down
2 changes: 1 addition & 1 deletion dj_rest_auth/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
urlpatterns = [
# URLs that do not require a session or valid token
path('password/reset/', PasswordResetView.as_view(), name='rest_password_reset'),
path('password/reset/confirm/', PasswordResetConfirmView.as_view(), name='rest_password_reset_confirm'),
path('password/reset/confirm/<uidb64>/<token>/', PasswordResetConfirmView.as_view(), name='password_reset_confirm'),
path('login/', LoginView.as_view(), name='rest_login'),
# URLs that require a user to be logged in with a valid session / token.
path('logout/', LogoutView.as_view(), name='rest_logout'),
Expand Down