Django - DRF Advanced Features
You want to create a custom serializer field that accepts a comma-separated string of numbers and outputs a list of integers. Which methods should you override and how?
to_internal_value must parse it into a list of integers.to_representation should convert the list back into a comma-separated string for output.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions