Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

overriding update in serializer django

def update(self, instance, validated_data):
    # MANIPULATE DATA HERE BEFORE INSERTION

    instance = super(ProduitUpdateSerializer,self).update(instance, validated_data)
    # ADD CODE HERE THAT YOU WANT TO VIEW
    return instance
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #overriding #update #serializer #django
ADD COMMENT
Topic
Name
7+2 =