def logout(self, request):
        try:
            request.user.auth_token.delete()
        except (__HOLE__, ObjectDoesNotExist):
            pass

        logout(request)

        return Response({"success": _("Successfully logged out.")},
                        status=status.HTTP_200_OK)
dataset/ETHPy150Open Tivix/django-rest-auth/rest_auth/views.py/LogoutView.logout