#24227: isinstance checks on ManyToManyField should be replaced with
field.many_to_many
-------------------------------------+-------------------------------------
Reporter: coldmind | Owner: coldmind
Type: | Status: assigned
Cleanup/optimization |
Component: Database layer | Version: master
(models, ORM) |
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by MarkusH):
* cc: MarkusH (added)
* stage: Unreviewed => Accepted
Comment:
This change should eventually happen at some point. But I don't think we
are there yet. If we are going to replace a bunch of `isinstance()` calls
in the migration / schema / ORM layers, we should also think about
`ForeignKey` and foreignkey-like fields, where `field.one_to_many` and
`field.one_to_one` join the game.
This ticket will require some deeper digging than the one referenced
(#24104).
As soon as composite fields and composite foreign keys are a thing, this
ticket will certainly be related.
--
Ticket URL: <https://code.djangoproject.com/ticket/24227#comment:4>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.c11052275548232c230d4565c4723c95%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.