>From the listviewserializer you are not showing any fields so obvioiusly, you have to define a class meta: and put fields to show
On Friday, April 28, 2023 at 9:57:47 PM UTC edin...@gmail.com wrote: > I have this serializes > class PostSerializer(serializers.ModelSerializer): > > class Meta: > model = Post > fields = ('name', 'html_code', 'order') > > > class PostListSerializer(serializers.ListSerializer): > child = PostSerializer() > > def create(self, validated_data): > .... > > and I am sending this payload to create multiple entries > [ > { > "name": "aaaa 2", > "order" : 3, > "html_code": "<p>test</p>" > }, > { > "name": "vvffv", > "order" : 3, > "html_code": "<p>test</p>" > } > ] > This works fine and entries are created. > But I have an issue when i try to view that endpoint in the *Web > Browsable Api* and i have this error > AttributeError: 'PostListSerializer' object has no attribute 'fields' > > -- You received this message because you are subscribed to the Google Groups "Django REST framework" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-rest-framework+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-rest-framework/fb857bb8-f6a1-4f2a-ae8b-c2d7be9978f4n%40googlegroups.com.