Monday, 9 September 2013

Django-rest-framework: required=False in serializer with null=False in Model

Django-rest-framework: required=False in serializer with null=False in Model

I want to keep NOT NULL restriction on database level and fill this field
with overridden save() method of model. And therefore I want permit users
to send serialized data to my app without that value. What Is the best way
to achieve such behaivior of Serializer-class?

No comments:

Post a Comment