Split django.db.models.fields.related into multiple modules.
|Reported by:||loic84||Owned by:||nobody|
|Component:||Database layer (models, ORM)||Version:||master|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||yes|
The django.db.models.fields.related module is very large and pretty hard to work with.
It contains a lot of similar concepts with only slight differences, and one thing can easily be mistaken for its exact opposite, which makes navigating the file very error-prone. This is made worse by the fact that some class name are borderline wrong, (e.g. ReverseSingleRelatedObjectDescriptor which actually is the forward FK descriptor).
Quoting akaariai: "fields/related.py is a brain melting machine".
This ticket proposes that we turn related.py into a package with the following modules: related_field.py, many_to_one.py, one_to_one.py and many_to_many.py.
Change History (9)
comment:1 Changed 18 months ago by timo
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Accepted