Re: Get count using annotate

2012-07-19 Thread Tom Evans
On Thu, Jul 19, 2012 at 5:00 PM, karan wrote: > Hi, > > my models is- > > class Students(models.Model): > country = models.ManyToManyField( Country ) > > I want to calculate the total number of student objects for each of the > country objects. > > I need the count of students interested i

Get count using annotate

2012-07-19 Thread karan
Hi, my models is- class Students(models.Model): country = models.ManyToManyField( Country ) I want to calculate the total number of student objects for each of the country objects. I need the count of students interested in each country so far in my database. I was trying something w

Get count using annotate

2012-07-19 Thread karan
Hi my model is like this- class Students(models.Model): -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/j3cittrFmXkJ. To post to this group, send email to