Реверс для 'password_reset_confirm' не найден

После ввода адреса электронной почты в django.urls.exceptions.NoReverseMatch: Reverse for 'password_reset_confirm' not found. 'password_reset_confirm' is not a valid view function or pattern name. и нажатия кнопки отправки у меня возникает ошибка password_reset.html. Почему он ищет password_reset_confirm именно в этой точке?

password_reset.html

{% extends "base.html" %}

{% block content %}
  <form method="post">
    {% csrf_token %}
    <h1>Forgot your password?</h1>
    <p>Enter your email address below, and we'll email instructions for setting a new one.</p>
    {{ form.as_p }}
    <button name="submit" class="btn">Send me instructions</button>
  </form>
{% endblock content %}

urls.py

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

from .forms import UserLoginForm
from . import views

app_name = "users"

urlpatterns = [
    path('login/', auth_views.LoginView.as_view(
        template_name='users/login.html',
        authentication_form=UserLoginForm),
        name="login"),
    path('logout/', auth_views.LogoutView.as_view(next_page='index'),
         name="logout"),
    path('register/', views.register, name="register"),
    path('password_reset_done/', auth_views.PasswordResetDoneView.as_view(
        template_name="users/password_reset_done.html"),
        name="password_reset_done"),
    path('reset_password/', auth_views.PasswordResetView.as_view(
        template_name="users/password_reset.html",
        success_url=reverse_lazy('users:password_reset_done')),
        name="reset_password"),
    path('reset_password_complete/', auth_views.PasswordResetCompleteView.as_view(
        template_name="users/reset_password_complete.html"),
        name="password_reset_complete"),
    path('reset/<uidb64>/<token>', auth_views.PasswordResetConfirmView.as_view(
        success_url=reverse_lazy('users:password_reset_complete')),
        name="password_reset_confirm"),
    path('activate/<uidb64>/<token>', views.activate, name="activate"),
]
Вернуться на верх