I'm trying to generate a link where the URL of the current page gets
passed in the querystring of the link.  Like so: <a href="http://
www.example.com?variable=http%3A%2F%2Fwww.example2.com%2Farg1%2Farg2%2F"></a>.

I would have thought that I could do this relatively easily with
template tags, so I've tried this:

<% url arg1, arg2 as the_url %>
<a href="http://www.example.com?variable={{ the_url|urlencode }}"></a>

However, for whatever reason, the urlencode filter isn't applied when
the_url renders.  Is there a way to do this directly in the template,
or do I have to generate the encoded URL in the view and pass it to
the template?

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to