summaryrefslogtreecommitdiff
path: root/django
diff options
context:
space:
mode:
authorRussell Keith-Magee <russell@keith-magee.com>2007-09-14 03:54:28 +0000
committerRussell Keith-Magee <russell@keith-magee.com>2007-09-14 03:54:28 +0000
commit2bec822ff345ed68047d618f707bb2765fad7e5f (patch)
tree4bf1073f91286b99e376108711d9e16635a24e24 /django
parent70e5dce3651de6f5494233802a5de609182045df (diff)
Fixed #3895 -- Added ability to customize the context variable in the archive_index generic view. Thanks to marco.giusti@gmail.com and toke-django@toke.de.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@6157 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django')
-rw-r--r--django/views/generic/date_based.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/django/views/generic/date_based.py b/django/views/generic/date_based.py
index 1a8c4c611a..e6a75e63aa 100644
--- a/django/views/generic/date_based.py
+++ b/django/views/generic/date_based.py
@@ -10,7 +10,7 @@ from django.http import Http404, HttpResponse
def archive_index(request, queryset, date_field, num_latest=15,
template_name=None, template_loader=loader,
extra_context=None, allow_empty=False, context_processors=None,
- mimetype=None, allow_future=False):
+ mimetype=None, allow_future=False, template_object_name='latest'):
"""
Generic top-level archive of date-based objects.
@@ -39,7 +39,7 @@ def archive_index(request, queryset, date_field, num_latest=15,
t = template_loader.get_template(template_name)
c = RequestContext(request, {
'date_list' : date_list,
- 'latest' : latest,
+ template_object_name : latest,
}, context_processors)
for key, value in extra_context.items():
if callable(value):