1
votes

I would like to auto populate some fields in a Serializer (Not a ModelSerializer)

I need a method I can hook into, that gives me both access to the data passed in, and the ability to manipulate which fields are shown dynamically (but I can see how to do that from the example in the docs)

Essentially, how can I access and manipulate the data that has been passed into the Serializer at it's initialisation.

http://www.django-rest-framework.org/api-guide/serializers/#example

1

1 Answers

1
votes

I believe the method you are looking for is .to_internal_value.