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

/rest-auth/password/reset/ gave 500 Error #205

Closed
ZachLiuGIS opened this issue Apr 21, 2016 · 3 comments
Closed

/rest-auth/password/reset/ gave 500 Error #205

ZachLiuGIS opened this issue Apr 21, 2016 · 3 comments

Comments

@ZachLiuGIS
Copy link

Here is my request:

http://localhost:8000/rest-auth/password/reset/

request body:
{"email": "test@gmail.com"}

error:

django.core.urlresolvers.NoReverseMatch: Reverse for 'password_reset_confirm' with arguments '()' and keyword arguments '{'token': '4b9-73e30e0cb92a36a7e52b', 'uidb64': b'Mg'}' not found. 0 pattern(s) tried: []
@Akay7
Copy link
Contributor

Akay7 commented Apr 21, 2016

Try this inside your base url pattern
url(r'^', include('django.contrib.auth.urls')),

@ZachLiuGIS
Copy link
Author

It worked as expected, great thanks.

I saw this in FAQ, missed that.

@Moulde
Copy link

Moulde commented Nov 29, 2017

This will add multiple unused urls, right?
https://github.com/django/django/blob/master/django/contrib/auth/urls.py

urlpatterns = [
    path('login/', views.LoginView.as_view(), name='login'),
    path('logout/', views.LogoutView.as_view(), name='logout'),

    path('password_change/', views.PasswordChangeView.as_view(), name='password_change'),
    path('password_change/done/', views.PasswordChangeDoneView.as_view(), name='password_change_done'),

    path('password_reset/', views.PasswordResetView.as_view(), name='password_reset'),
    path('password_reset/done/', views.PasswordResetDoneView.as_view(), name='password_reset_done'),
    path('reset/<uidb64>/<token>/', views.PasswordResetConfirmView.as_view(), name='password_reset_confirm'),
    path('reset/done/', views.PasswordResetCompleteView.as_view(), name='password_reset_complete'),
]

I would think a solution where you add the specific missing route is prefered - even if that requires you to copy the route from contrib.
Like it says in the FAQ http://django-rest-auth.readthedocs.io/en/latest/faq.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants