Hi,What is a way to get the union of two QuerySets?
Something like:
In [6]: a = Person.objects.filter(first_
name__startswith='mic') In [7]: b = Person.objects.filter(first_
name__startswith='joh') In [8]: a + b
Thanks a lot,
Ray
Try:
a | b
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/-/ie69j4ewJNUJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
No comments:
Post a Comment