• Home
  • Django
  • Many to Many Field add Method removes duplicates

Many to Many Field add Method removes duplicates

linkaiyi
Follow

Fields.models.relatedFieldDescriptors.relatedManager

add method use list.difference() method (similar like list - list) to get the difference before adding to relations

add method can do bulk connection via model.field.add(*queryset)

Object has 0 attachments

Was this article helpful?

This article is viewed 28 times!

0 Comments

Leave a Comment

Support