﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
32324	Wrapping the header in base.html of contrib.abmin in {% blocks %}.	Muskan Vaswan	Muskan Vaswan	"
=== Use case
Allowing the user to overwrite the Top Navigation Bar od the admin page.

=== Existing method

to Overwrite the top nav-bar without having to overwrite the entire template of base.html, the user currently has to add the

{{{
{% extends ""admin/base_site.html"" %}
{% load static %}
{% block branding %}
{% endblock %}
}}}
 
to admin/base_site.html and`

{{{
{% extends ""admin/base.html"" %}
{% load static %}
{% block usertools %}
{% endblock %}
}}}
 to admin/base.html.
No other method, other than overwriting the entire template exists.

=== Issue with Existing method

1. Even after doing the above, the top-bar doesn't entirely disappear due to the CSS applied on the <div> with the id of header
(Image attached)

2. The user must extend two separate files to even make this happen.

=== Solution

The simple solution is to wrap the entire header class using {% block ... %}. So the final django/admin/base.html would have:

{{{
    <!-- Header -->
    {% block header %}
    <div id=""header"">
        ...
    </div>
    {% endblock %}
    <!-- END Header -->

}}}

=== Final Result
The user will be able to overwrite the default blue-green nav-bar *entirely* by adding


{{{
{% extends ""admin/base.html"" %}
{% load static %}
{% block header %}
{% endblock %}
}}}
to admin/base.html.
"	Cleanup/optimization	new	contrib.admin	3.1	Normal		admin customize		Accepted	0	0	0	0	1	1
