MCPcopy
hub / github.com/django/django / _forward_fields_map

Method _forward_fields_map

django/db/models/options.py:641–653  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

639
640 @cached_property
641 def _forward_fields_map(self):
642 res = {}
643 fields = self._get_fields(reverse=False)
644 for field in fields:
645 res[field.name] = field
646 # Due to the way Django's internals work, get_field() should also
647 # be able to fetch a field by attname. In the case of a concrete
648 # field with relation, includes the *_id name too
649 try:
650 res[field.attname] = field
651 except AttributeError:
652 pass
653 return res
654
655 @cached_property
656 def fields_map(self):

Callers

nothing calls this directly

Calls 1

_get_fieldsMethod · 0.95

Tested by

no test coverage detected