PasswordResetView, html_email_template_name не обновляется

Вид:

class ResetPasswordView(SuccessMessageMixin, PasswordResetView):
    template_name = 'accounts/reset_password.html'
    html_email_template_name = 'accounts/password_reset_email.html'
    success_message = 'Instructions to reset your password will be sent to the email you provided. Thank you.'
    success_url = reverse_lazy('accounts:profile')

html шаблон электронной почты:

You're receiving this email because you requested a password reset for your user account at {{ site_name }}.

Please go to the following page and choose a new password:
{% block reset_link %}
{{ protocol }}://{{ domain }}{% url 'accounts:password_reset_confirm' uidb64=uid token=token %}
{% endblock %}

Your username, in case you’ve forgotten: {{ user.get_username }}

The {{ site_name }} team.

URLs:

urlpatterns = [
    path('update-password/', UpdatePasswordView.as_view(), name='update_password'),
    path('reset-password/', ResetPasswordView.as_view(), name='reset_password'),
]

Несмотря на установку пути шаблона для письма, Django продолжает загружать вместо него шаблон по умолчанию: \lib\site-packages\django\contrib\admin\templates\registration\password_reset_email.html

Почему он не использует accounts/password_reset_email.html?

Вернуться на верх