Opened 6 days ago
Last modified 5 days ago
#36194 closed New feature
add async support to ManyToManyField — at Version 1
Reported by: | amirreza | Owned by: | amirreza |
---|---|---|---|
Component: | Forms | Version: | 5.1 |
Severity: | Normal | Keywords: | |
Cc: | amirreza, Jon Janzen, Andrew Godwin | Triage Stage: | Unreviewed |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description (last modified by )
hi
i'm working on an async version of ModelForm
on a third party package
a problem that occurs is the lack of async support in mant to many fields
in particular, _save_m2m
https://github.com/django/django/blob/main/django/forms/models.py#L536 calls save_form_data
https://github.com/django/django/blob/main/django/db/models/fields/related.py#L2010, but there is no async equivalent to this mathod
even tho save_form_data
is basically calling ManyRelatedManager.set
https://github.com/django/django/blob/main/django/db/models/fields/related_descriptors.py#L1275 which has an async equivalent
so i think adding an async version is a feasible option, ofc this means adding async version of other methods of ManyToManyField that need one
so i'm volunteering for this