[patch] Limit which fields are serialized in serializers.serialize.
|Reported by:||deryck@…||Owned by:||adrian|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
After playing with the serializer stuff, I wanted to be able to limit which fields in the model were serialized. The app I
serializers.serialize('json', foo.objects.all(), fields=('somefield', 'anotherfield'))
The patch provides "fields" as an optional parameter. Without it, the serializer works as normal.
Change History (3)
Changed 8 years ago by deryck@…
comment:1 Changed 8 years ago by deryck@…
- Summary changed from Limit which fields are serialized in serializers.serialize. to [patch] Limit which fields are serialized in serializers.serialize.