summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/generic_views.txt23
1 files changed, 23 insertions, 0 deletions
diff --git a/docs/generic_views.txt b/docs/generic_views.txt
index 166ad8347d..317828a2b2 100644
--- a/docs/generic_views.txt
+++ b/docs/generic_views.txt
@@ -250,6 +250,18 @@ with a date in the *future* are not displayed.
* ``context_processors``: A list of template-context processors to apply to
the view's template. See the `RequestContext docs`_.
+ * ``template_object_name``: Designates the name of the template variable
+ to use in the template context. By default, this is ``'object'``. The
+ view will append ``'_list'`` to the value of this parameter in
+ determining the variable's name.
+
+ * ``make_object_list``: A boolean specifying whether to retrieve the full
+ list of objects for this year and pass those to the template. If ``True``,
+ this list of objects will be made available to the template as
+ ``object_list``. (The name ``object_list`` may be different; see the docs
+ for ``object_list`` in the "Template context" section below.) By default,
+ this is ``False``.
+
* ``mimetype``: The MIME type to use for the resulting document. Defaults
to the value of the ``DEFAULT_MIME_TYPE`` setting.
@@ -265,8 +277,19 @@ In addition to ``extra_context``, the template's context will be:
* ``date_list``: A list of ``datetime.date`` objects representing all
months that have objects available in the given year, according to
``queryset``, in ascending order.
+
* ``year``: The given year, as a four-character string.
+ * ``object_list``: If the ``make_object_list`` parameter is ``True``, this
+ will be set to a list of objects available for the given year, ordered by
+ the date field. This variable's name depends on the
+ ``template_object_name`` parameter, which is ``'object'`` by default. If
+ ``template_object_name`` is ``'foo'``, this variable's name will be
+ ``foo_list``.
+
+ If ``make_object_list`` is ``False``, ``object_list`` will be passed to
+ the template as an empty list.
+
``django.views.generic.date_based.archive_month``
-------------------------------------------------