1👍
You should change your code as below:
def clear(request):
Message.objects.filter(user=request.user).delete()
Source:stackexchange.com
1👍
You should change your code as below:
def clear(request):
Message.objects.filter(user=request.user).delete()