GithubHelp home page GithubHelp logo

Reverse for 'password_reset_confirm' not found. 'password_reset_confirm' is not a valid view function or pattern name. about django-rest-auth HOT 7 OPEN

vahidkoohkan avatar vahidkoohkan commented on August 17, 2024
Reverse for 'password_reset_confirm' not found. 'password_reset_confirm' is not a valid view function or pattern name.

from django-rest-auth.

Comments (7)

mikiyas-Haile avatar mikiyas-Haile commented on August 17, 2024 4

Add this pattern, It worked for me.

from django.urls import include, path, re_path
from rest_auth.views import PasswordResetConfirmView
urlpatterns = [
# ...
        path('rest-auth/password/reset/confirm/<str:uidb64>/<str:token>', PasswordResetConfirmView.as_view(),
            name='password_reset_confirm'),
# ..
]

from django-rest-auth.

swalih-mohammed avatar swalih-mohammed commented on August 17, 2024

solved mine too

from django-rest-auth.

Rahmani21 avatar Rahmani21 commented on August 17, 2024

Add this pattern, It worked for me.

from django.urls import include, path, re_path
from rest_auth.views import PasswordResetConfirmView
urlpatterns = [
# ...
        path('rest-auth/password/reset/confirm/<str:uidb64>/<str:token>', PasswordResetConfirmView.as_view(),
            name='password_reset_confirm'),
# ..
]

Still not workink

from django-rest-auth.

elinteerie avatar elinteerie commented on August 17, 2024

did not work for me

from django-rest-auth.

SiddhantTotade avatar SiddhantTotade commented on August 17, 2024

Hi! This error occurs when the email is entered correctly: django.urls.exceptions.NoReverseMatch: Reverse for 'password_reset_confirm' not found. 'password_reset_confirm' is not a valid view function or pattern name. And when the wrong email is entered, this response will be returned:

{
    "detail": "Password reset e-mail has been sent."
}

(The result was the same in both logged in and logged out modes)

a part of my code:

from django.urls import include, path

urlpatterns = [
    path('rest-auth/', include('rest_auth.urls')),
    path('rest-auth/registration/', include('rest_auth.registration.urls')),

I also tried this code but it was not useful:

from django.urls import include, path, re_path
from rest_auth.views import PasswordResetConfirmView

re_path(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'),

django-rest-auth == 0.9.5 Django == 3.2.9 python == 3.9.0

I am also having the same issue. when i pass an incorrect email in password/reset then it shows success message Password reset e-mail has been sent. but when i pass the actual email which exist in the database it throws error.

Why is this happening? someone tell me

urlpatterns = [
    path("admin/", admin.site.urls),
    path("auth/", include("dj_rest_auth.urls")),
    path("auth/registration/", include("dj_rest_auth.registration.urls")),
    path("auth/password/reset", PasswordResetView.as_view(), name="rest_password_reset"),
    path("auth/registration/account-confirm-email/<str:key>/", redirect_email_confirm, name="account_email_verification_sent"),
    path("auth/reset/passowrd/confirm/<int:uid>/<str:token>/", reset_password_confirm, name="password_reset_confirm"),
    path('auth/google/', GoogleLogin.as_view(), name='google_login'),
]

from django-rest-auth.

Rahmani21 avatar Rahmani21 commented on August 17, 2024

from django-rest-auth.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.