Serialize queryset in Django rest framework

To serialize a queryset or list of objects instead of a single object instance, you should pass the many=True flag when instantiating the serializer. So in your case try this:

...
venues = profile.venue_set.all()
serializer = VenueSerializer(venues, many=True)
...

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)