Skip to content
Advertisement

Tag: dry

How to add data to Many-To-Many field in Django DRF

I’m new to Django DRF, trying to have a sports school project done. I have a model for coaches, classes and students. Here is a stripped version to keep it simple and easy: In order to list/add students to the class, I’m using the following serializer: Getting the data is working ok. Also, adding a coach is working fine, what

Advertisement