Get the current url in django template

167 views
Skip to first unread message

Asif Jamadar

unread,
Nov 10, 2011, 1:51:10 AM11/10/11
to django...@googlegroups.com

I want to display the current url in django template. I tried {{request.get_full_path}} but this is not working with me. Any solution?

Martin Pajuste

unread,
Nov 10, 2011, 10:58:46 AM11/10/11
to django...@googlegroups.com

Andres Reyes

unread,
Nov 10, 2011, 11:53:53 AM11/10/11
to django...@googlegroups.com
To use the request object in a template you need django.core.context_processors.request in your TEMPLATE_CONTEXT_PROCESSORS


2011/11/10 Martin Pajuste <martin...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/PzqmOq5u8ysJ.

To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.



--
Andrés Reyes Monge
arm...@gmail.com
+(505)-8873-7217

Sultan Imanhodjaev

unread,
Nov 10, 2011, 11:49:12 PM11/10/11
to django...@googlegroups.com

Hello,

Once I used request.META["PATH_INFO"]

Reply all
Reply to author
Forward
0 new messages