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. Returnsday_formatby default.
-
get_day()[source] -
Returns the day for which this view will display data, as a string. Tries the following sources, in order:
- The value of the
DayMixin.dayattribute. - The value of the
dayargument captured in the URL pattern. - The value of the
dayGETquery argument.
Raises a 404 if no valid day specification can be found.
- The value of the
-
get_next_day(date)[source] -
Returns a date object containing the next valid day after the date provided. This function can also return
Noneor raise anHttp404exception, depending on the values ofallow_emptyandallow_future.
-
get_previous_day(date)[source] -
Returns a date object containing the previous valid day. This function can also return
Noneor raise anHttp404exception, depending on the values ofallow_emptyandallow_future.
Please login to continue.