MCPcopy Index your code
hub / github.com/encode/django-rest-framework / get_initial

Method get_initial

rest_framework/fields.py:398–405  ·  view source on GitHub ↗

Return a value to use when the field is being returned as a primitive value, without any object instance.

(self)

Source from the content-addressed store, hash-verified

396 return list(self.default_validators)
397
398 def get_initial(self):
399 """
400 Return a value to use when the field is being returned as a primitive
401 value, without any object instance.
402 """
403 if callable(self.initial):
404 return self.initial()
405 return self.initial
406
407 def get_value(self, dictionary):
408 """

Callers

nothing calls this directly

Calls 1

initialMethod · 0.80

Tested by

no test coverage detected