MCPcopy
hub / github.com/django/django / uses_datetime_field

Method uses_datetime_field

django/views/generic/dates.py:260–267  ·  view source on GitHub ↗

Return `True` if the date field is a `DateTimeField` and `False` if it's a `DateField`.

(self)

Source from the content-addressed store, hash-verified

258
259 @cached_property
260 def uses_datetime_field(self):
261 """
262 Return `True` if the date field is a `DateTimeField` and `False`
263 if it's a `DateField`.
264 """
265 model = self.get_queryset().model if self.model is None else self.model
266 field = model._meta.get_field(self.get_date_field())
267 return isinstance(field, models.DateTimeField)
268
269 def _make_date_lookup_arg(self, value):
270 """

Callers

nothing calls this directly

Calls 3

get_date_fieldMethod · 0.95
get_querysetMethod · 0.45
get_fieldMethod · 0.45

Tested by

no test coverage detected