I am using postgres as my backedn in django Application
I have 4 models in my app
class sprint(models.model):
sprintname = models.CharField(max_length=100)
.....
class testcases(models.model):
testcasename = models.CharField(max_length=100)
sprint = models.ForiegnKeyField(sprint)
.......
class tags(models.model)
tagname = models.CharField(max_length=100)
testcase = models.ForiegnKeyField(testcases)
class sprinttestcases(models.Model):
sprint = models.Foriegnkey(sprint)
testcase = model.Foriegnkey(testcase)
tag = models.ForiegnKey(tags)
Using django templates , I am outputing these values in Ui on a sprint basis
Like below. Here the testcases and tags will be in drop downs
How to write django query to get data like this?
Tried these, but not sure on how to proceed.
q= SprintTestcases.objects.filter(something).\
values('sprint_id','testcase_id').annotate(tmlist = ArrayAgg('tag'))