I am interested in knowing the proper way of performing the following function:
<li {% if request.path == '/' or '/<int> %}class="active"{% endif %}><a href="{{ url_for('index') }}"><i class="fa fa-home" aria-hidden="true"></i> Home</a></li>
The above does work however, if one visits a url such as '/article/3' or '/anything/', the 'active' class is triggered as well.
I had tried the following:
<li {% if request.path == '/<int> %}class="active"{% endif %}><a href="{{ url_for('index') }}"><i class="fa fa-home" aria-hidden="true"></i> Home</a></li>
The integer is representing a page number which is set to 1 by default.