date_list_period Optional A string defining the aggregation period for date_list. It must be one of 'year' (default), 'month', or 'day'.
allow_empty A boolean specifying whether to display the page if no objects are available. If this is True and no objects are available, the view will display an empty page instead of raising a 404. This is identical to django.views.generic.list.MultipleObjectMixin.allow_empty, except for the default value, which is False.
get_dated_queryset(**lookup) [source] Returns a queryset, filtered using the query arguments defined by lookup. Enforces any restrictions on the queryset, such as allow_empty and allow_future.
class BaseDateListView [source] A base class that provides common behavior for all date-based views. There won’t normally be a reason to instantiate BaseDateListView; instantiate one of the subclasses instead. While this view (and its subclasses) are executing, self.object_list will contain the list of objects that the view is operating upon, and self.date_list will contain the list of dates for which data is available. Mixins DateMixin MultipleObjectMixin Methods and Attributes allow_emp
get_dated_items() [source] Returns a 3-tuple containing (date_list, object_list, extra_context). date_list is the list of dates for which data is available. object_list is the list of objects. extra_context is a dictionary of context data that will be added to any context data provided by the MultipleObjectMixin.
get_date_list(queryset, date_type=None, ordering='ASC') [source] Returns the list of dates of type date_type for which queryset contains entries. For example, get_date_list(qs, 'year') will return the list of years for which qs has entries. If date_type isn’t provided, the result of get_date_list_period() is used. date_type and ordering are simply passed to QuerySet.dates().
http_method_names The list of HTTP method names that this view will accept. Default: ['get', 'post', 'put', 'patch', 'delete', 'head', 'options', 'trace'] Methods
class ArchiveIndexView [source] A top-level index page showing the “latest” objects, by date. Objects with a date in the future are not included unless you set allow_future to True. Ancestors (MRO) django.views.generic.list.MultipleObjectTemplateResponseMixin django.views.generic.base.TemplateResponseMixin django.views.generic.dates.BaseArchiveIndexView django.views.generic.dates.BaseDateListView django.views.generic.list.MultipleObjectMixin django.views.generic.dates.DateMixin django.views.
class BaseArchiveIndexView [source]
options(request, *args, **kwargs) Handles responding to requests for the OPTIONS HTTP verb. Returns a response with the Allow header containing a list of the view’s allowed HTTP method names.
Page 16 of 226