Commits

Matthew Schinckel committed b7bc3a2

Allow jsonify template filter to work with querysets.

  • Participants
  • Parent commits adfcf25

Comments (0)

Files changed (2)

 History
 ----------
 
+0.8.9
+~~~~~
+Allow ``{{ variable|jsonify }}`` to work with querysets.
+
 0.8.8
 ~~~~~
 Prevent circular import problem with django 1.3.1 and gargoyle.

File jsonfield/templatetags/jsonify.py

 
 @register.filter
 def jsonify(value):
+    if getattr(value, 'all'):
+        value = list(value)
     return mark_safe(json.dumps(value, cls=TZAwareJSONEncoder))