MCPcopy
hub / github.com/django/django / _get_dated_items

Method _get_dated_items

django/views/generic/dates.py:607–625  ·  view source on GitHub ↗

Do the actual heavy lifting of getting the dated items; this accepts a date object so that TodayArchiveView can be trivial.

(self, date)

Source from the content-addressed store, hash-verified

605 return self._get_dated_items(date)
606
607 def _get_dated_items(self, date):
608 """
609 Do the actual heavy lifting of getting the dated items; this accepts a
610 date object so that TodayArchiveView can be trivial.
611 """
612 lookup_kwargs = self._make_single_date_lookup(date)
613 qs = self.get_dated_queryset(**lookup_kwargs)
614
615 return (
616 None,
617 qs,
618 {
619 "day": date,
620 "previous_day": self.get_previous_day(date),
621 "next_day": self.get_next_day(date),
622 "previous_month": self.get_previous_month(date),
623 "next_month": self.get_next_month(date),
624 },
625 )
626
627
628class DayArchiveView(MultipleObjectTemplateResponseMixin, BaseDayArchiveView):

Callers 2

get_dated_itemsMethod · 0.95
get_dated_itemsMethod · 0.80

Calls 6

get_dated_querysetMethod · 0.80
get_previous_dayMethod · 0.80
get_next_dayMethod · 0.80
get_previous_monthMethod · 0.80
get_next_monthMethod · 0.80

Tested by

no test coverage detected