Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

django how to set a navbar active

<li class="nav-item {% if request.resolver_match.view_name == 'scores:list' %}active{% endif %}">
    <a class="nav-link" href="{% url 'scores:list' %}">Scores</a>
</li>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #django #set #navbar #active
ADD COMMENT
Topic
Name
6+5 =