MCPcopy
hub / github.com/django/django / get_ordering

Method get_ordering

django/views/generic/dates.py:325–330  ·  view source on GitHub ↗

Return the field or fields to use for ordering the queryset; use the date field by default.

(self)

Source from the content-addressed store, hash-verified

323 )
324
325 def get_ordering(self):
326 """
327 Return the field or fields to use for ordering the queryset; use the
328 date field by default.
329 """
330 return "-%s" % self.get_date_field() if self.ordering is None else self.ordering
331
332 def get_dated_queryset(self, **lookup):
333 """

Callers

nothing calls this directly

Calls 1

get_date_fieldMethod · 0.80

Tested by

no test coverage detected