I want to implement the Django reset password function but it gets stuck when it tries to sent the email. Error code: Reverse for 'password_reset_confirm' not found. 'password_reset_confirm' is not a valid view function or pattern name. error-code-picture
I´ve tried the form with crispy and I´ve tried to let Django do it all alone (without my views) but it´s not working.
urls: urls-picture
path('password-reset/',
auth_views.PasswordResetView.as_view(
template_name='web/users/password_reset.html'),
name='password_reset'),
path('password-reset/done/',
auth_views.PasswordResetDoneView.as_view(
template_name='web/users/password_reset_done.html'),
name='password_reset_done'),
path('password-reset-confirm/<uidb64>/<token>/',
auth_views.PasswordResetConfirmView.as_view(
template_name='web/users/password_reset_confirm.html'),
name='password_reset_confirm'),
password-reset-confirm view (just the form): password-reset-confirm template
<form method="POST">
{% csrf_token %}
<div class="form-group">
{{ form.email }}
<label for="username" class="control-label">Email</label><i class="bar"></i>
</div>
<div class="button-container">
<input type="submit" class="button" value="Passwort ändern"/>
</div>
</form>
I think the problem is that it´s not passing the uidb64 and the token to the email template.
{% url 'account:password_reset_confirm' ... %}
)? the error isn't the missing uid or token, it's about a patter name not found. – dirkgrotenpath('password-reset-confirm/<uidb64>/<token>/', auth_views.PasswordResetConfirmView.as_view(), name='password_reset_confirm'),
. The same error appiers. So it had nothing to do with my template I think. – Webbuddy