Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 12 lines (7 sloc) 0.269 kB
4100242 Sphinx docs, examples, lots of refactoring
tom christie tom@tomchristie.com authored
1 from django.template import Library
97c5262 @tomchristie Refactor add_query_param to use URLObject. Refs #112.
authored
2 from urlobject import URLObject
4100242 Sphinx docs, examples, lots of refactoring
tom christie tom@tomchristie.com authored
3 register = Library()
4
97c5262 @tomchristie Refactor add_query_param to use URLObject. Refs #112.
authored
5
4100242 Sphinx docs, examples, lots of refactoring
tom christie tom@tomchristie.com authored
6 def add_query_param(url, param):
ce6e5fd Renderers can now cope with parameterised args. ResponseMixin gets c…
Tom Christie authored
7 (key, sep, val) = param.partition('=')
97c5262 @tomchristie Refactor add_query_param to use URLObject. Refs #112.
authored
8 return unicode(URLObject(url) & (key, val))
4100242 Sphinx docs, examples, lots of refactoring
tom christie tom@tomchristie.com authored
9
10
11 register.filter('add_query_param', add_query_param)
Something went wrong with that request. Please try again.