Admin action- queryset to apply Many to Many
问题 How do I use the admin action to create a queryset which will apply a Many-to-Many value? I understand the 'value' will have to already exist (in my case, the colour itsel will have to exist). Models class Colours(models.Model): colour_name = models.CharField(max_length=50) class Car(models.Model): brand = models.CharField(max_length=200) available_colours = models.ManyToManyField(Colours, blank=True) Admin.py class CarAdmin(admin.ModelAdmin): actions = ['Red'] Attempt 1: only works for FK