(self)
| 654 | |
| 655 | @cached_property |
| 656 | def fields_map(self): |
| 657 | res = {} |
| 658 | fields = self._get_fields(forward=False, include_hidden=True) |
| 659 | for field in fields: |
| 660 | res[field.name] = field |
| 661 | # Due to the way Django's internals work, get_field() should also |
| 662 | # be able to fetch a field by attname. In the case of a concrete |
| 663 | # field with relation, includes the *_id name too |
| 664 | try: |
| 665 | res[field.attname] = field |
| 666 | except AttributeError: |
| 667 | pass |
| 668 | return res |
| 669 | |
| 670 | def get_field(self, field_name): |
| 671 | """ |
nothing calls this directly
no test coverage detected