Fixed #7670 -- Fixed a couple of missed changes from [7865]. Patch from jshaffer.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@7869 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Malcolm Tredinnick 2008-07-08 05:29:23 +00:00
parent a616b92174
commit 409ed9468f
2 changed files with 2 additions and 2 deletions

View File

@ -611,7 +611,7 @@ class ChangeList(object):
return mark_safe('?' + '&'.join([u'%s=%s' % (k, v) for k, v in p.items()]).replace(' ', '%20')) return mark_safe('?' + '&'.join([u'%s=%s' % (k, v) for k, v in p.items()]).replace(' ', '%20'))
def get_results(self, request): def get_results(self, request):
paginator = QuerySetPaginator(self.query_set, self.lookup_opts.admin.list_per_page) paginator = Paginator(self.query_set, self.lookup_opts.admin.list_per_page)
# Get the number of objects, with admin filters applied. # Get the number of objects, with admin filters applied.
try: try:

View File

@ -45,7 +45,7 @@ def object_list(request, queryset, paginate_by=None, page=None,
if extra_context is None: extra_context = {} if extra_context is None: extra_context = {}
queryset = queryset._clone() queryset = queryset._clone()
if paginate_by: if paginate_by:
paginator = QuerySetPaginator(queryset, paginate_by, allow_empty_first_page=allow_empty) paginator = Paginator(queryset, paginate_by, allow_empty_first_page=allow_empty)
if not page: if not page:
page = request.GET.get('page', 1) page = request.GET.get('page', 1)
try: try: