Ticket #14232: date_list_documentation_patch.diff

File date_list_documentation_patch.diff, 2.1 KB (added by Ian Clelland, 9 years ago)
  • docs/ref/generic-views.txt

     
    197197
    198198In addition to ``extra_context``, the template's context will be:
    199199
    200     * ``date_list``: A list of ``datetime.date`` objects representing all
    201       years that have objects available according to ``queryset``. These are
    202       ordered in reverse. This is equivalent to
    203       ``queryset.dates(date_field, 'year')[::-1]``.
     200    * ``date_list``: A ``DateQuerySet`` object containing all years that have
     201      have objects available according to ``queryset``, represented as
     202      ``datetime.datetime`` objects. These are ordered in reverse. This is
     203      equivalent to ``queryset.dates(date_field, 'year')[::-1]``.
    204204
    205205    .. versionchanged:: 1.0
    206206       The behaviour depending on ``template_object_name`` is new in this version.
     
    282282
    283283In addition to ``extra_context``, the template's context will be:
    284284
    285     * ``date_list``: A list of ``datetime.date`` objects representing all
    286       months that have objects available in the given year, according to
    287       ``queryset``, in ascending order.
     285    * ``date_list``: A ``DateQuerySet`` object containing all months that have
     286      have objects available according to ``queryset``, represented as
     287      ``datetime.datetime`` objects, in ascending order.
    288288
    289289    * ``year``: The given year, as a four-character string.
    290290
     
    372372
    373373In addition to ``extra_context``, the template's context will be:
    374374
    375     * ``date_list``: A list of ``datetime.date`` objects representing all
    376       days that have objects available in the given month, according to
    377       ``queryset``, in ascending order.   
     375    * ``date_list``: A ``DateQuerySet`` object containing all days that have
     376      have objects available in the given month, according to ``queryset``,
     377      represented as ``datetime.datetime`` objects, in ascending order.
    378378
    379379    * ``month``: A ``datetime.date`` object representing the given month.
    380380
Back to Top