Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

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
Luke Plant authored

Showing 1 changed file with 1 addition and 1 deletion. Show diff stats Hide diff stats

  1. 2  django/views/generic/list_detail.py
2  django/views/generic/list_detail.py
@@ -34,7 +34,6 @@ def object_list(request, queryset, paginate_by=None, allow_empty=False,
34 34
             number of objects, total
35 35
     """
36 36
     queryset = queryset._clone()
37  
-    model = queryset.model
38 37
     if paginate_by:
39 38
         paginator = ObjectPaginator(queryset, paginate_by)
40 39
         page = request.GET.get('page', 1)
@@ -71,6 +70,7 @@ def object_list(request, queryset, paginate_by=None, allow_empty=False,
71 70
         else:
72 71
             c[key] = value
73 72
     if not template_name:
  73
+        model = queryset.model
74 74
         template_name = "%s/%s_list.html" % (model._meta.app_label, model._meta.object_name.lower())
75 75
     t = template_loader.get_template(template_name)
76 76
     return HttpResponse(t.render(c))

0 notes on commit 2326928

Please sign in to comment.
Something went wrong with that request. Please try again.