aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/util.py
diff options
context:
space:
mode:
Diffstat (limited to 'mediagoblin/util.py')
-rw-r--r--mediagoblin/util.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/mediagoblin/util.py b/mediagoblin/util.py
index d37d160e..f56bea43 100644
--- a/mediagoblin/util.py
+++ b/mediagoblin/util.py
@@ -29,8 +29,6 @@ from mediagoblin import globals as mgoblin_globals
import urllib
from math import ceil
import copy
-import decorators
-from webob import exc
TESTS_ENABLED = False
def _activate_testing():
@@ -353,13 +351,13 @@ class Pagination(object):
yield num
last = num
- def get_page_url(self, path_info, page_no, get_params=None):
+ def get_page_url(self, request, page_no):
"""
- Get a new page based of the path_info, the new page number,
- and existing get parameters.
+ Get a new page url based of the request, and the new page number.
"""
+ path_info = request.path_info
+ get_params = request.GET
new_get_params = copy.copy(get_params or {})
new_get_params['page'] = page_no
return "%s?%s" % (
path_info, urllib.urlencode(new_get_params))
-