5👍
✅
You should return the list instead of raw queryset.
def get_queryset(self):
return list(Message.objects.raw('SELECT * FROM ertaapp_message where to_prof_id=%s ORDER BY create_date DESC',[self.request.user.id]))
Source:stackexchange.com