Reputation: 301
I want to develop a best practice for placing a navbar in all my Django web apps.
At the moment I am placing the navbar in base.html. And then extending base.html on all other templates.
I have seen that some people create a navbar.html and then include that in base.html.
Is there a best practice here? Are there any advantages to using navbar.html?
Upvotes: 1
Views: 55
Reputation: 6404
Some peoples are like to decouple each of components/section. For example, some people want to separate footer.html
, sidebar.html
, navbar.html
, topbar.html
, rightbar.html
etc and include it on base.html
. This it does not give you any extra advantages rather than some thinks if I just want to change something in my footer
, then I just go to my footer.html
and change what I want. By this I don't need to go base.html
and scroll down to find were is my footer
section.
Upvotes: 1