I have a M2M field in my django model project. In my view I want to update a model instance with update() function. I know that for updating other ordinary fields we can pass a dictionary of the fields.
But how can I pass M2M field to update() function?
I have a M2M field in my django model project. In my view I
Share
You can easily add relations to the ManyToManyField using the
add()function (outside of yourupdate()):