I have two models Pigeons and Treatment. Every pigeon can have multiple treatment. I want to create some groups of pigeon like all pigeons, male, female, squeakers and when I want to create a treatment to select the group and assign the medication.
#models class Pigeons(models.Model): ring= models.CharField(max_length=25, null=False, blank=False, unique=True) status = models.ForeignKey(PigeonStatus, on_delete=models.CASCADE, null=False, blank=False) … class Treatment(models.Model): date = models.DateTimeField(default=timezone.now, null=True, blank=True) # we can treat only one pigeon pigeon = models.ManyToManyField(Pigeons, on_delete=models.CASCADE) # or select group to assign medication group = … medication = models.ForeignKey(Medication, on_delete=models.SET_NULL) Which is the best approach to do this? I have to create a separate model that store groups or it can be done in the template?