1

I use rest-auth for backend with django rest framework.

In urls:

path('rest-auth/', include('rest_auth.urls')),
path('rest-auth/registration/', include('rest_auth.registration.urls'))-at

when I access to http://localhost:8000/rest-auth/password/reset/ I get an email field. After providing email, I get NoReverseMatch at /rest-auth/password/reset/. Mainly, Reverse for 'password_reset_confirm' not found. 'password_reset_confirm' is not a valid view function or pattern name.

How can I fix this??

I tried in urls:

    from rest_auth.views import PasswordResetConfirmView

    url(r'^rest-auth/password/reset/confirm/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$',
    PasswordResetConfirmView.as_view(),
    name='password_reset_confirm')

Now I get an email and when I go to the link I get four field (New password1, New password2, Uid, Token) but (Uid and Token field are empty).

How can I get this 2 field (Uid and Token) filled with url's Uid and Token??

Jhon Arab
  • 121
  • 1
  • 1
  • 4
  • 1
    If you are using front-end like React, an example would be [React example](https://stackoverflow.com/questions/40769136/django-rest-auth-reset-password-uid-and-token). As written in the urls.py, you have to retrieve the parameters of **uid** and **token** from the url – Muzamir Jun 07 '20 at 15:15

0 Answers0