Ссылка на логин в password_reset_complete направляет пользователя к аккаунту / логину, а не к аккаунту / логину. Как мне это решить?
Ошибка:
Using the URLconf defined in tutorial.urls, Django tried these URL patterns, in this order:
[name='login_redirect']
admin/
account/
The current path, accounts/login/, didn't match any of these.
счета / urls.py:
urlpatterns = [
path('', views.home, name="home"),
path('login/', LoginView.as_view(template_name='accounts/login.html'), name='login'),
path('logout/', LogoutView.as_view(template_name='accounts/logout.html'), name='logout'),
path('register/', views.register, name='register'),
path('profile/', views.view_profile, name='profile'),
path('profile/edit/', views.edit_profile, name='profile-edit'),
path('change-password/', views.change_password, name='change-password'),
path('reset-password/', PasswordResetView.as_view(), name='reset-password'),
path('reset-password/done/', PasswordResetDoneView.as_view(), name='password_reset_done'),
path('reset-password/confirm/<uidb64>/<token>/',
PasswordResetConfirmView.as_view(), name='password_reset_confirm'),
path('reset-password/complete/', PasswordResetCompleteView.as_view(), name='password_reset_complete'),
основной / urls.py:
urlpatterns = [
path(r'', views.login_redirect, name='login_redirect'),
path('admin/', admin.site.urls),
path('account/', include('accounts.urls')),
]
settings.py:
LOGIN_REDIRECT_URL = '/account/'
Спасибо