

def post(self, request):
    serializer = self.serializer_class(data=user.data)
    serializer.is_valid(raise_exception=True)
    user = serializer.validated_data['user']
    (token, created) = Token.objects.get_or_create(user=user)
    return Response({
        'token': token.key,
    })

dataset/ETHPy150Open ekonstantinidis/django-rest-framework-docs/tests/views.py LoginView.post/VarMisuse@20/22 `request`->`user`