Exemplo n.º 1
0
 def to_native(self, obj):
     ret = super(PitchSerializer, self).to_native(obj)
     for i, comment in enumerate(obj.comments.all()):
         ret["comments"][i] = Comment.dump_bulk(comment)
         users = User.objects.all()
         self.add_users(ret["comments"][i], users)
     return ret