M CONTRIBUTORS.txt => CONTRIBUTORS.txt +3 -1
@@ 1,1 1,3 @@
-Eric Florenzano <floguy@gmail.com>>
\ No newline at end of file
+Eric Florenzano <floguy@gmail.com>
+Martin Mahner <martin@mahner.org>
+James Tauber <jtauber@gmail.com><
\ No newline at end of file
M => +1 -1
@@ 6,5 6,5 @@ class PaginationMiddleware(object):
def process_request(self, request):
try:
request.page = int(request['page'])
except KeyError:
except (KeyError, ValueError):
request.page = 1
\ No newline at end of file
M => +3 -1
@@ 71,7 71,9 @@ class AutoPaginateNode(template.Node):
paginator = paginator_class(value, self.paginate_by)
try:
page_obj = paginator.page(context['request'].page)
except:
except InvalidPage:
context[key] = []
context['invalid_page'] = True
return u''
context[key] = page_obj.object_list
context['paginator'] = paginator