Commit 0954765e by Sean C. Farley

Chase changes to URLObject's API in v2.0.0

URLObject v2.0.0 removed parse() from its API.
parent 45cf5260
...@@ -685,7 +685,7 @@ class PaginatorMixin(object): ...@@ -685,7 +685,7 @@ class PaginatorMixin(object):
""" """
Constructs a url used for getting the next/previous urls Constructs a url used for getting the next/previous urls
""" """
url = URLObject.parse(self.request.get_full_path()) url = URLObject(self.request.get_full_path())
url = url.set_query_param('page', page_number) url = url.set_query_param('page', page_number)
limit = self.get_limit() limit = self.get_limit()
......
...@@ -4,8 +4,7 @@ register = Library() ...@@ -4,8 +4,7 @@ register = Library()
def add_query_param(url, param): def add_query_param(url, param):
(key, sep, val) = param.partition('=') return unicode(URLObject(url).with_query(param))
return unicode(URLObject.parse(url) & (key, val))
register.filter('add_query_param', add_query_param) register.filter('add_query_param', add_query_param)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment