MCPcopy
hub / github.com/django/django / value_from_object

Method value_from_object

django/db/models/fields/__init__.py:1191–1193  ·  view source on GitHub ↗

Return the value of this field in the given model instance.

(self, obj)

Source from the content-addressed store, hash-verified

1189 return form_class(**defaults)
1190
1191 def value_from_object(self, obj):
1192 """Return the value of this field in the given model instance."""
1193 return getattr(obj, self.attname)
1194
1195 def slice_expression(self, expression, start, length):
1196 """Return a slice of this field."""

Callers 15

value_to_stringMethod · 0.95
value_to_stringMethod · 0.45
value_to_stringMethod · 0.45
value_to_stringMethod · 0.45
handle_fieldMethod · 0.45
_value_from_fieldMethod · 0.45
model_to_dictFunction · 0.45
get_pk_value_on_saveMethod · 0.45
value_to_stringMethod · 0.45
value_to_stringMethod · 0.45
value_to_stringMethod · 0.45
value_to_stringMethod · 0.45

Calls

no outgoing calls