Chase changes to URLObject's API in v2.0.0

URLObject v2.0.0 removed parse() from its API.
This commit is contained in:
Sean C. Farley 2012-02-20 12:56:27 -05:00
parent 45cf5260ac
commit 0954765e91
2 changed files with 2 additions and 3 deletions

View File

@ -685,7 +685,7 @@ class PaginatorMixin(object):
"""
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)
limit = self.get_limit()

View File

@ -4,8 +4,7 @@ register = Library()
def add_query_param(url, param):
(key, sep, val) = param.partition('=')
return unicode(URLObject.parse(url) & (key, val))
return unicode(URLObject(url).with_query(param))
register.filter('add_query_param', add_query_param)