Ticket #15575: is_paginated.2.diff
File is_paginated.2.diff, 1.3 KB (added by , 14 years ago) |
---|
-
django/views/generic/list.py
47 47 raise Http404(_(u"Page is not 'last', nor can it be converted to an int.")) 48 48 try: 49 49 page = paginator.page(page_number) 50 return (paginator, page, page.object_list, True)50 return (paginator, page, page.object_list, page.has_other_pages()) 51 51 except InvalidPage: 52 52 raise Http404(_(u'Invalid page (%(page_number)s)') % { 53 53 'page_number': page_number -
tests/regressiontests/generic_views/list.py
46 46 self.assertIs(res.context['author_list'], res.context['object_list']) 47 47 self.assertEqual(res.context['page_obj'].number, 1) 48 48 self.assertEqual(res.context['paginator'].num_pages, 1) 49 self.assert True(res.context['is_paginated'])49 self.assertFalse(res.context['is_paginated']) 50 50 51 51 def test_paginated_get_page_by_query_string(self): 52 52 self._make_authors(100)