Questions tagged [drf-writable-nested]

2 questions
0
votes
1 answer

Create records in two models by Nested serializer with two foreign keys pointing same model in Django

Make two records on the same table Department by foreingn key relation using nested serializer. ,this Department two records are creating at same time the People table created class Department(BaseModel): name =…
0
votes
1 answer

How to use drf-writable-nested to create-or-update?

I took the Django drf-writable-nested package and made it a complete implementation called drf-writable-example by adding a bit of REST code (see below). (See drf-writable-nested page for the models and serializers.) If I POST their JSON example…
dfrankow
  • 20,191
  • 41
  • 152
  • 214