How to get the current url name using Django?

I don’t know how long this feature has been part of Django but as the following article shows, it can be achieved as follows in the view: from django.core.urlresolvers import resolve current_url = resolve(request.path_info).url_name If you need that in every template, writing a template request can be appropriate. Edit: APPLYING NEW DJANGO UPDATE Following the … Read more