3 | | GenericForeignKey *not* being a `Field` is confusing. It is added as a “field” and returned by `Model._meta.get_fields()`, a type confusion [https://github.com/typeddjango/django-stubs/blob/5a8e7b3855ea6f7be2b2ab928d02eff9a748d917/django-stubs/db/models/options.pyi#L122-L124 reflected in django-stubs]. It also duplicates code from `Field`. |
| 3 | GenericForeignKey *not* being a `Field` leads to several issues: |
| 4 | 1. It is added as a “field” and returned by `Model._meta.get_fields()`, a type confusion [https://github.com/typeddjango/django-stubs/blob/5a8e7b3855ea6f7be2b2ab928d02eff9a748d917/django-stubs/db/models/options.pyi#L122-L124 reflected in django-stubs]. |
| 5 | 2. It duplicates code, such as `_check_field_name()`. |
| 6 | 3. It misses methods like `__repr__()`. |