How can I create group of objects to store information?

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(, 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? 

First format your code so that we can understand what’s going on right now I cannot see anything with that

I know nothing about pigeons … but being curious I intuitively explored how to use free shinyapp

… here is one project I found through a simple search “shinyapp pigeons”.

and the explanatory pdf in that site …

Here is


and you will need RStudio for your code.