Re: UNION ALL in Django Orm?

2016-06-17 Thread Ezequiel Bertti
Take a look on this project https://github.com/Suor/django-union/ On Fri, Jun 17, 2016 at 7:16 PM, wrote: > I have two different queries on the same model that are in essence like > this: > > queryset_1 = models.Plan.object.filter(name__startswith='a').annotate(

UNION ALL in Django Orm?

2016-06-17 Thread cderwin
I have two different queries on the same model that are in essence like this: queryset_1 = models.Plan.object.filter(name__startswith='a').annotate(group= Value('Group A', output_field=CharField())) queryset_2 = models.Plan.object.filter(name__startswith='b').annotate(group=Value('Group B',