a = Client.objects.filter(name__istartswith='a') b = Client.objects.filter(name__iendswith='t')print a.count() print b.count()
c = a & b print c.count()
--To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAOzwKwE8d%3DJNaP%3DLzsCwYQOvpkGOvumU0mCNv7sOZ0jKhyvw8Q%40mail.gmail.com.
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/SHT4Fka0uwQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
QuerySets have supported the '&' operator (as measured by implementing the __and__() method) for as long as they've been in Django; the implementation dates all the way back to 0.95.
--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/SHT4Fka0uwQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAL13Cg-gDwDCW5oB1jeeaGrMBNGrCGST0TMiwDh2idC317THMQ%40mail.gmail.com.