Return a list of fields associated to the model. By default, include forward and reverse fields, fields derived from inheritance, but not hidden fields. The returned fields can be changed using the parameters: - include_parents: include fields derived from inheritan
(self, include_parents=True, include_hidden=False)
| 863 | self._get_fields_cache = {} |
| 864 | |
| 865 | def get_fields(self, include_parents=True, include_hidden=False): |
| 866 | """ |
| 867 | Return a list of fields associated to the model. By default, include |
| 868 | forward and reverse fields, fields derived from inheritance, but not |
| 869 | hidden fields. The returned fields can be changed using the parameters: |
| 870 | |
| 871 | - include_parents: include fields derived from inheritance |
| 872 | - include_hidden: include fields that have a related_name that |
| 873 | starts with a "+" |
| 874 | """ |
| 875 | if include_parents is False: |
| 876 | include_parents = PROXY_PARENTS |
| 877 | return self._get_fields( |
| 878 | include_parents=include_parents, include_hidden=include_hidden |
| 879 | ) |
| 880 | |
| 881 | def _get_fields( |
| 882 | self, |