class documentation

class YearMixin:

Known subclasses: django.views.generic.dates.BaseDateDetailView, django.views.generic.dates.BaseDayArchiveView, django.views.generic.dates.BaseMonthArchiveView, django.views.generic.dates.BaseWeekArchiveView, django.views.generic.dates.BaseYearArchiveView

View In Hierarchy

Mixin for views manipulating year-based data.
Method get​_next​_year Get the next valid year.
Method get​_previous​_year Get the previous valid year.
Method get​_year Return the year for which this view should display data.
Method get​_year​_format Get a year format string in strptime syntax to be used to parse the year from url variables.
Class Variable year Undocumented
Class Variable year​_format Undocumented
Method ​_get​_current​_year Return the start date of the current interval.
Method ​_get​_next​_year Return the start date of the next interval.
def get_next_year(self, date):
Get the next valid year.
def get_previous_year(self, date):
Get the previous valid year.
def get_year(self):
Return the year for which this view should display data.
def get_year_format(self):
Get a year format string in strptime syntax to be used to parse the year from url variables.
year =

Undocumented

year_format: str =

Undocumented

def _get_current_year(self, date):
Return the start date of the current interval.
def _get_next_year(self, date):

Return the start date of the next interval.

The interval is defined by start date <= item date < next start date.