if request.method == 'POST':
    data = {'comment': request.data['comment'], 'rating': request.data[
        'rating'], 'author': request.data['author'], 'recipient': user.id}
serializer = CommentFlat(data=data)
if serializer.is_valid():
    serializer.save()
Overriding Django REST ViewSet with custom post method and model