how to get the current url path in django template

You can use the {{ request.path }} in a Django template to get the current URL path. This will directly output the current URL path without any modification.