Reverse for 'password_reset_confirm' not found. 'password_reset_confirm' is not a valid view function or pattern name. Django-rest-auth

24 views Asked by At

I'm doing the Django password reset but this error always happens and I don't know why

Here are the urls:

from django.urls import path
from . import views
from django.contrib.auth import views as auth_views

app_name = 'accounts'

urlpatterns = [
path('login/', views.login, name="login"),
path('registrar/', views.registrar, name="registrar"),
path('logout/', views.logout, name="logout"),

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

Here are my custom pages:

my custom pages:

And these are the project urls:

from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static


urlpatterns = [
path('accounts/', include('accounts.urls')),
path('admin/', admin.site.urls),
path('', include('home.urls')),
path('turmas/', include('turmas.urls')),
path('calendario/', include('calendario.urls')),
]

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
0

There are 0 answers