Negligible code cleanup for the sake of clarity.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@2969 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
9a4c39bb82
commit
23269289be
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue