The navbar currently uses separate blocks for each item in the navbar. This makes the code to handle the navbar clumsy as it is split over the templates.
{{ request.resolver_match.url_name }} in a template returns the name of the view that is rendering the template.
We already have names for all the views. So this can be used in base.html along with a few {% ifequal %} statements to set a navbar item as active.
The navbar currently uses separate blocks for each item in the navbar. This makes the code to handle the navbar clumsy as it is split over the templates.
{{ request.resolver_match.url_name }} in a template returns the name of the view that is rendering the template. We already have names for all the views. So this can be used in base.html along with a few {% ifequal %} statements to set a navbar item as active.