[patch] Limit which fields are serialized in serializers.serialize.
|Reported by:||Owned by:||Adrian Holovaty|
|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)
comment:1 Changed 11 years ago by
|Summary:||Limit which fields are serialized in serializers.serialize. → [patch] Limit which fields are serialized in serializers.serialize.|