Friday, August 30, 2019

Re: PasswordResetDoneView not using custom template in Django

could you please show the content of "PasswordResetDoneView" ?

On Thu, Aug 29, 2019 at 3:31 AM siva reddy <sivatoms@gmail.com> wrote:

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.

--
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+unsubscribe@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.

--
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+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAJenkLC-1C47TgJ7LiG2hCVLcmOOYpJiqk3V1TwqjZtSNM_LgQ%40mail.gmail.com.

No comments:

Post a Comment