diff options
| author | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-02-01 13:42:30 +0100 |
|---|---|---|
| committer | Aymeric Augustin <aymeric.augustin@m4x.org> | 2013-02-01 13:43:20 +0100 |
| commit | 11f6295551fbcedae50df0efcae5eb34555a46dd (patch) | |
| tree | c19cec525724c5b52c9b880f68fc6f2930cc8217 /docs/ref | |
| parent | 5ebd0452ba6ff93980e6f9a8958f6ea01c835ffe (diff) | |
[1.5.x] Documented ArchiveIndexView's date_list context variable.
Refs #16218.
Backport of a0c67c6.
Diffstat (limited to 'docs/ref')
| -rw-r--r-- | docs/ref/class-based-views/generic-date-based.txt | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/docs/ref/class-based-views/generic-date-based.txt b/docs/ref/class-based-views/generic-date-based.txt index 42dbab4dd8..4144c382f8 100644 --- a/docs/ref/class-based-views/generic-date-based.txt +++ b/docs/ref/class-based-views/generic-date-based.txt @@ -42,6 +42,20 @@ ArchiveIndexView * :class:`django.views.generic.dates.DateMixin` * :class:`django.views.generic.base.View` + **Context** + + In addition to the context provided by + :class:`django.views.generic.list.MultipleObjectMixin` (via + :class:`django.views.generic.dates.BaseDateListView`), the template's + context will be: + + * ``date_list``: A + :meth:`DateQuerySet<django.db.models.query.QuerySet.dates>` object + containing all years that have objects available according to + ``queryset``, represented as + :class:`datetime.datetime<python:datetime.datetime>` objects, in + descending order. + **Notes** * Uses a default ``context_object_name`` of ``latest``. @@ -109,7 +123,6 @@ YearArchiveView Determine if an object list will be returned as part of the context. Returns :attr:`~YearArchiveView.make_object_list` by default. - **Context** In addition to the context provided by @@ -118,7 +131,7 @@ YearArchiveView context will be: * ``date_list``: A - :meth:`DateQuerySet<django.db.models.query.QuerySet.dates>` object object + :meth:`DateQuerySet<django.db.models.query.QuerySet.dates>` object containing all months that have objects available according to ``queryset``, represented as :class:`datetime.datetime<python:datetime.datetime>` objects, in |
