class WeekMixin
from django.views.generic.dates import WeekMixin
Descendants
Attributes
Defined in | |
---|---|
week = None
|
WeekMixin |
week_format = '%U'
|
WeekMixin |
Methods
def
get_week(self):
WeekMixin
¶
def
get_week(self):
WeekMixin
¶
Return the week for which this view should display data
128 129 130 131 132 133 134 135 136 137 138 139 | def get_week(self): "Return the week for which this view should display data" week = self.week if week is None: try: week = self.kwargs['week'] except KeyError: try: week = self.request.GET['week'] except KeyError: raise Http404(_(u"No week specified")) return week |
def
get_week_format(self):
WeekMixin
¶
def
get_week_format(self):
WeekMixin
¶
Get a week format string in strptime syntax to be used to parse the week from url variables.
121 122 123 124 125 126 | def get_week_format(self): """ Get a week format string in strptime syntax to be used to parse the week from url variables. """ return self.week_format |