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

Support for namedtuple

Manuel Barkhau
created an issue

{{{

!diff -r piston/emitters.py

--- a/piston/emitters.py Fri Apr 29 16:36:41 2011 +0200 +++ b/piston/emitters.py Fri Apr 29 17:21:31 2011 +0200 @@ -103,6 +103,8 @@

         if isinstance(thing, QuerySet):
             ret = _qs(thing, fields)
  • elif isinstance(thing, tuple) and hasattr(thing, '_asdict'):
  • ret = _dict(thing._asdict(), fields) elif isinstance(thing, (tuple, list, set)): ret = _list(thing, fields) elif isinstance(thing, dict): }}}

Comments (0)

  1. Log in to comment