views.generic.dates.DateDetailView

class DateDetailView [source] A page representing an individual object. If the object has a date value in the future, the view will throw a 404 error by default, unless you set allow_future to True. Ancestors (MRO) django.views.generic.detail.SingleObjectTemplateResponseMixin django.views.generic.base.TemplateResponseMixin django.views.generic.dates.BaseDateDetailView django.views.generic.dates.YearMixin django.views.generic.dates.MonthMixin django.views.generic.dates.DayMixin django.views.g

views.generic.dates.DateMixin

class DateMixin [source] A mixin class providing common behavior for all date-based views. Methods and Attributes date_field The name of the DateField or DateTimeField in the QuerySet’s model that the date-based archive should use to determine the list of objects to display on the page. When time zone support is enabled and date_field is a DateTimeField, dates are assumed to be in the current time zone. Otherwise, the queryset could include objects from the previous or the next day in the

views.generic.dates.DateMixin.allow_future

allow_future A boolean specifying whether to include “future” objects on this page, where “future” means objects in which the field specified in date_field is greater than the current date/time. By default, this is False.

views.generic.dates.DateMixin.date_field

date_field The name of the DateField or DateTimeField in the QuerySet’s model that the date-based archive should use to determine the list of objects to display on the page. When time zone support is enabled and date_field is a DateTimeField, dates are assumed to be in the current time zone. Otherwise, the queryset could include objects from the previous or the next day in the end user’s time zone. Warning In this situation, if you have implemented per-user time zone selection, the same URL

views.generic.dates.DateMixin.get_allow_future()

get_allow_future() [source] Determine whether to include “future” objects on this page, where “future” means objects in which the field specified in date_field is greater than the current date/time. Returns allow_future by default.

views.generic.dates.DateMixin.get_date_field()

get_date_field() [source] Returns the name of the field that contains the date data that this view will operate on. Returns date_field by default.

views.generic.dates.DayArchiveView

class DayArchiveView [source] A day archive page showing all objects in a given day. Days in the future throw a 404 error, regardless of whether any objects exist for future days, unless you set allow_future to True. Ancestors (MRO) django.views.generic.list.MultipleObjectTemplateResponseMixin django.views.generic.base.TemplateResponseMixin django.views.generic.dates.BaseDayArchiveView django.views.generic.dates.YearMixin django.views.generic.dates.MonthMixin django.views.generic.dates.DayMi

views.generic.dates.DayMixin

class DayMixin [source] A mixin that can be used to retrieve and provide parsing information for a day component of a date. Methods and Attributes day_format The strftime() format to use when parsing the day. By default, this is '%d'. day Optional The value for the day, as a string. By default, set to None, which means the day will be determined using other means. get_day_format() [source] Returns the strftime() format to use when parsing the day. Returns day_format by default

views.generic.dates.DayMixin.day

day Optional The value for the day, as a string. By default, set to None, which means the day will be determined using other means.

views.generic.dates.DayMixin.day_format

day_format The strftime() format to use when parsing the day. By default, this is '%d'.