class ParentChileSerializer(serializers.ModelSerializer):
class Meta:
model = ParentChild
fields = ('id', 'parent','child_id')
View
??
Not sure how to proceed. Appreciate any help.
- Shekar
Have a look at this SO post that the DRF author responded to for a similar situation.
http://stackoverflow.com/questions/13376894/django-rest-framework-nested-self-referential-objects
As far as the view, you'll need to be more specific about what you want the view to do. The serializer is probably the hard part though.
-James
--
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 django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b4bd6e40-b9ac-4b55-8631-f06417634b3f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.