1. Jesper Noehr
  2. django-piston
  3. Issues
Issue #139 new

The emitter should support chained querysets

jonozzz
created an issue

The fix is pretty simple assuming that the user chained a queryset:

in piston/emitters.py instead of: {{{

!python

if isinstance(thing, QuerySet): }}}

use: {{{

!python

import itertools if isinstance(thing, (QuerySet, itertools.chain)): }}}

Chained QuerySets are useful when you need to join two or more QS and you don't have to use UNION in raw SQL.

Comments (0)

  1. Log in to comment