In [2]: 
Review.objects.values('description','user','review_type','reviewmapping_
   ...: 
_insitute').annotate(Count('description','user')).annotate(Count('review
   ...: _type','reviewmapping__insitute')).count()
Out[2]: 2720

I want ids of these for filter reviews
for this I use

In [3]: 
Review.objects.values('description','user','review_type','reviewmapping_
   ...: 
_insitute').annotate(Count('description','user')).annotate(Count('review
   ...: _type','reviewmapping__insitute')).values_list('id').count()
Out[3]: 5139

this give id of total objects

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/515ac610-2280-4e44-a85a-b65800068309%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to