MCPcopy
hub / github.com/django/django / _db_default_expression

Method _db_default_expression

django/db/models/fields/__init__.py:1088–1094  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

1086
1087 @cached_property
1088 def _db_default_expression(self):
1089 db_default = self.db_default
1090 if self.has_db_default() and not hasattr(db_default, "resolve_expression"):
1091 from django.db.models.expressions import Value
1092
1093 db_default = Value(db_default, self)
1094 return db_default
1095
1096 def get_choices(
1097 self,

Callers

nothing calls this directly

Calls 2

has_db_defaultMethod · 0.95
ValueClass · 0.90

Tested by

no test coverage detected