from rest_framework.serializers import Serializer, CharField

class InnerSerializer(Serializer):
    name = CharField()
    title = CharField()


class RootSerializer(Serializer):
    inners = InnerSerializer(many=True)
    some_other_field = CharField()

When I create a partial serializer: `s = RootSerializer(partial=True)`, the 
fields in InnerSerializer become not required any more.
I think it is reasonable that the fields in root serializer are not 
required when it is partial.
But at times, I need a `always required` field in inner serializer which is 
required regardless of whether root serializer is partial.

Sorry for my poor English.

-- 
You received this message because you are subscribed to the Google Groups 
"Django REST framework" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-rest-framework+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to