I have a password_change_form.html which is custom formatted on the website. I'm overriding the Django default template with my template. But, it is not rendering my template. It just rendering the default template as below.
I have created a custom formated template
base.html
<div class="dropdown-menu dropdown-menu-right" aria-labelledby="navbarDropdown">
<a class="dropdown-item" href="{% url 'password_change' %}">Change password</a>
<div class="dropdown-divider"></div>
password_change_form.html
{% extends 'home/base.html' %}
{% block body %}
<h2>
Change password
</h2>
<form method="post">
{% csrf_token %}
{{ form.as_p }}
<button type="submit" class="btn btn-primary">Change password</button>
</form>
{% endblock %}
urls.py
from django.contrib import admin
from django.urls import path, include
from Shopping.cart import urls
urlpatterns = [
path('', include('Shopping.cart.urls')),
path('accounts/', include('django.contrib.auth.urls')),
path('admin/', admin.site.urls),
]
I wanted to see my template overrides the Django default template
Resolved I made a mistake that I placed my templates folder inside the app. this was causing the problem. Now I moved my template folder to the Project folder. Now everything working fine. Thank you.
