Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Negligible code cleanup for the sake of clarity.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@2969 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 23269289bee44cb9c9dcaa1512a3e49539f936f6 1 parent 9a4c39b
@spookylukey spookylukey authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  django/views/generic/list_detail.py
View
2  django/views/generic/list_detail.py
@@ -34,7 +34,6 @@ def object_list(request, queryset, paginate_by=None, allow_empty=False,
number of objects, total
"""
queryset = queryset._clone()
- model = queryset.model
if paginate_by:
paginator = ObjectPaginator(queryset, paginate_by)
page = request.GET.get('page', 1)
@@ -71,6 +70,7 @@ def object_list(request, queryset, paginate_by=None, allow_empty=False,
else:
c[key] = value
if not template_name:
+ model = queryset.model
template_name = "%s/%s_list.html" % (model._meta.app_label, model._meta.object_name.lower())
t = template_loader.get_template(template_name)
return HttpResponse(t.render(c))
Please sign in to comment.
Something went wrong with that request. Please try again.