Hello people,
There are two models that are related to each other.
class Parent(models.Model):
name = models.CharField...
class Child(models.Model):
parent = models.ForeignKey(Parent)
value = models.CharField...
And there is a serializer built on "Child" model:
class ChildSerializer(serializers.ModelSerializer):
class Meta:
model = Child
What I need is getting all Child objects related with Parent object via
ChildSerializer
What should I do to achieve to the solution?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/CACp8TZhC-tNYpVVAkRSGbS%2B9czU2U5oHvP5cR0ikiSAEGyWt1g%40mail.gmail.com.