1 | Index: django/views/generic/date_based.py
|
---|
2 | ===================================================================
|
---|
3 | --- django/views/generic/date_based.py (revisione 4903)
|
---|
4 | +++ django/views/generic/date_based.py (copia locale)
|
---|
5 | @@ -8,7 +8,7 @@
|
---|
6 | def archive_index(request, queryset, date_field, num_latest=15,
|
---|
7 | template_name=None, template_loader=loader,
|
---|
8 | extra_context=None, allow_empty=False, context_processors=None,
|
---|
9 | - mimetype=None, allow_future=False):
|
---|
10 | + mimetype=None, allow_future=False, template_object_name='latest'):
|
---|
11 | """
|
---|
12 | Generic top-level archive of date-based objects.
|
---|
13 |
|
---|
14 | @@ -37,7 +37,7 @@
|
---|
15 | t = template_loader.get_template(template_name)
|
---|
16 | c = RequestContext(request, {
|
---|
17 | 'date_list' : date_list,
|
---|
18 | - 'latest' : latest,
|
---|
19 | + template_object_name : latest,
|
---|
20 | }, context_processors)
|
---|
21 | for key, value in extra_context.items():
|
---|
22 | if callable(value):
|
---|