def follow(self, request):
        """
        Creates the follow relationship.
        The current user is set as user and the target is passed with content_type_id/object_id pair
        """
        data = request.data.dict()
        if 'content_type_id' not in data:
            return Response(status=400)
        ctype = get_object_or_404(ContentType, id=data.pop('content_type_id'))
        obj = ctype.get_object_for_this_type(pk=data.pop('object_id'))
        follow_action(request.user, obj, **data)
        return Response(status=201)

        Creates the follow relationship.
        The current user is set as user and the target is passed with content_type_id/object_id pair
        
actstream/drf/views.py