Inheriting nav-global block in admin/base_site.html

215 views
Skip to first unread message

Gagan Deep

unread,
Jan 15, 2021, 8:20:55 AM1/15/21
to Django developers (Contributions to Django itself)
Greetings of the day,

I was working with templates for the admin site of Django. I added some HTML elements to the nav-global block of the admin/base.html template, but surprisingly they did not show up on the final render page. Upon deeper inspection using django-debug-toolbar, I realized that the admin/base_site.html template extends admin/base.html and overrides the nav-global block without adding anything to it.

In my opinion, admin/base_site.html should inherit the nav-global block of admin/base.html instead of overriding it. I wanted to discuss it before going ahead to open a ticket for this. I tried to find a reason for adopting the current implementation, but couldn't find anything even by git blame.


Best, 
Gagan Deep



Reply all
Reply to author
Forward
0 new messages