0
someone knows if da to capture the name of the url on the page?
type to want to make a condition to use class="active" example:
{% if url 'create_indicador' %}
<li class="active">.......
{% else %}
<li>........
{% endif %}
thank you in advance!
Edson good night, man how do I put this in my template? I thought about doing something like this ai in case I’m just guessing how it looks.... {% if 'create_indicator/' is get_full_path() %} <li class="active">.... {% Else %} <li>........ {% endif %} my url path('create_indicator/', include('Django.indicators.urls')),
– Luis Marra
You’ve tried it your way, it seems to work.
– Edson Camargo
Edson worked that way {% if '/create_indicator/' == request.path %} <li class="active">....... {% Else %} <li>..... {% endif %}
– Luis Marra