~netlandish/django-pagination

d4c2881356622fbe0653c1e5e183f2c0dba8e79b — floguy 16 years ago fbc082c
Fixed #1.  Thanks, Martin Mahner and Jannis Leidel.

git-svn-id: https://django-pagination.googlecode.com/svn/trunk@21 7f1efe38-554e-0410-b69d-834cb44da2d5
3 files changed, 7 insertions(+), 3 deletions(-)

M CONTRIBUTORS.txt
M pagination/middleware.py
M pagination/templatetags/pagination_tags.py
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 pagination/middleware.py => pagination/middleware.py +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 pagination/templatetags/pagination_tags.py => pagination/templatetags/pagination_tags.py +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