class documentation

class WeekMixin:

Known subclasses: django.views.generic.dates.BaseWeekArchiveView

View In Hierarchy

Mixin for views manipulating week-based data.
Method get​_next​_week Get the next valid week.
Method get​_week Return the week for which this view should display data.
Method get​_week​_format Get a week format string in strptime syntax to be used to parse the week from url variables.
Class Variable week Undocumented
Class Variable week​_format Undocumented
Method ​_get​_current​_week Return the start date of the current interval.
Method ​_get​_next​_week Return the start date of the next interval.
Method ​_get​_weekday Return the weekday for a given date.
Method get​_previous​_week Get the previous valid week.
def get_next_week(self, date):
Get the next valid week.
def get_week(self):
Return the week for which this view should display data.
def get_week_format(self):
Get a week format string in strptime syntax to be used to parse the week from url variables.
week =

Undocumented

week_format: str =

Undocumented

def _get_current_week(self, date):
Return the start date of the current interval.
def _get_next_week(self, date):

Return the start date of the next interval.

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

def _get_weekday(self, date):

Return the weekday for a given date.

The first day according to the week format is 0 and the last day is 6.

def get_previous_week(self, date):
Get the previous valid week.