1
0
mirror of https://github.com/django/django.git synced 2025-11-07 07:15:35 +00:00

Fixed #14504 -- Corrected the way object_list is used in ListView to avoid overwriting context. Includes improved usage of unittest2 assertions. Thanks to Łukasz Rekucki for the final patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14372 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee
2010-10-28 02:58:28 +00:00
parent 8bc2f2a0b5
commit baa1e90d4c
3 changed files with 25 additions and 20 deletions

View File

@@ -77,7 +77,7 @@ class MultipleObjectMixin(object):
"""
Get the context for this view.
"""
queryset = kwargs.get('object_list')
queryset = kwargs.pop('object_list')
page_size = self.get_paginate_by(queryset)
if page_size:
paginator, page, queryset, is_paginated = self.paginate_queryset(queryset, page_size)