summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
fbc082c)
git-svn-id: https://django-pagination.googlecode.com/svn/trunk@21
7f1efe38-554e-0410-b69d-
834cb44da2d5
-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
def process_request(self, request):
try:
request.page = int(request['page'])
def process_request(self, request):
try:
request.page = int(request['page'])
+ except (KeyError, ValueError):
request.page = 1
\ No newline at end of file
request.page = 1
\ No newline at end of file
paginator = paginator_class(value, self.paginate_by)
try:
page_obj = paginator.page(context['request'].page)
paginator = paginator_class(value, self.paginate_by)
try:
page_obj = paginator.page(context['request'].page)
+ except InvalidPage:
+ context[key] = []
+ context['invalid_page'] = True
return u''
context[key] = page_obj.object_list
context['paginator'] = paginator
return u''
context[key] = page_obj.object_list
context['paginator'] = paginator