mirror of
https://github.com/encode/django-rest-framework.git
synced 2024-11-24 02:24:03 +03:00
Merge pull request #227 from mammique/filter
add_query_param should preserve previous querystring
This commit is contained in:
commit
b1fca03089
|
@ -4,7 +4,7 @@ register = Library()
|
||||||
|
|
||||||
|
|
||||||
def add_query_param(url, param):
|
def add_query_param(url, param):
|
||||||
return unicode(URLObject(url).with_query(param))
|
return unicode(URLObject(url).add_query_param(*param.split('=')))
|
||||||
|
|
||||||
|
|
||||||
register.filter('add_query_param', add_query_param)
|
register.filter('add_query_param', add_query_param)
|
Loading…
Reference in New Issue
Block a user