Quantcast
Channel: Django Restful: Nested Serializers - Stack Overflow
Browsing latest articles
Browse All 2 View Live

Answer by Amrit for Django Restful: Nested Serializers

in your SampleSerializer. You have specified 'tests' which is not in your Sample class in your model...Use nested SerializerMethodField as below....tests = serializers.SerializerMethodField()def...

View Article


Django Restful: Nested Serializers

I'm adding a 'tests' field to my 'Sample' model, where 'tests' will be a list of 'TestRequest' objects. Currently, I'm getting this error:Got AttributeError when attempting to get a value for field...

View Article
Browsing latest articles
Browse All 2 View Live