PasswordResetDoneView not using custom template in Django

53 views
Skip to first unread message

siva reddy

unread,
Aug 28, 2019, 10:32:32 PM8/28/19
to Django users

PasswordResetDoneView.as_view is not loading custom template I'm using Django 2.2 version

I have created a custom template and add the path to the accounts app URL


url(r'^reset_password/done/$',PasswordResetDoneView.as_view(template_name='accounts/my_password_reset_done.html'),name='my_password_reset_done'),

My Template

{% extends 'base.html' %}

{% block body %}
<div class="container">
    <h1>Password Reset Done</h1>
    <p>
        We've emailed you instructions for setting your password if an account exists with the email you entered. You should receive them shortly.
        If you don't receive an email, please make sure you've entered the address you registered with, and check your spam folder.
    </p>

</div>
{% endblock %}

The issue
if I have -
path('', include('django.contrib.auth.urls')),
in my main URL then it is loading default Django template. if I removed that I'm getting the error that path doesn't exist and I'm trying to override the Django template with my own template but it is not loading.

Sim

unread,
Aug 30, 2019, 6:52:06 AM8/30/19
to django...@googlegroups.com
could you please show the content of "PasswordResetDoneView" ?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ab9a3d39-02ae-48c3-928d-1d1d87f508c2%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages