Answers for "django get current page"

0

how to get the current url path in django template

{{ request.path }}  #  -without GET parameters 
{{ request.get_full_path }}  # - with GET parameters
Posted by: Guest on August-03-2020
0

current page django

<a href="/some/path/to/be/highlighted/"{% if request.path == '/some/path/to/be/highlighted/' %} class="active"{% endif %}>Some Link</a>
Posted by: Guest on August-10-2020

Python Answers by Framework

Browse Popular Code Answers by Language