sbdchd / django-types

:doughnut: Type stubs for Django
MIT License
202 stars 63 forks source link

Allow adding and removing field values (typically primary keys) in many-to-many relationships. #82

Closed TonyRippy closed 2 years ago

TonyRippy commented 2 years ago

From the docs for add(): https://docs.djangoproject.com/en/4.0/ref/models/relations/#django.db.models.fields.related.RelatedManager.add

For many-to-many relationships add() accepts either model instances or field values, normally primary keys, as the *objs argument.

Likewise for remove(): https://docs.djangoproject.com/en/4.0/ref/models/relations/#django.db.models.fields.related.RelatedManager.remove

For many-to-many relationships remove() accepts either model instances or field values, normally primary keys, as the *objs argument.