title: AttributeError no attribute 'delete'
body: <p>i am working on a website where users can send friend request, accept request, cancel request. I have an error AttributeError object has no attribute 'delete'. This happens when i cancel friend request. This my code i tried:</p>
  
  <p>Model:</p>
  
  <pre><code>class FriendRequest(models.Model):
      to_user = models.ForeignKey(settings.AUTH_USER_MODEL,on_delete=models.CASCADE, related_name='to_user')
      from_user = models.ForeignKey(settings.AUTH_USER_MODEL,on_delete=models.CASCADE, related_name='from_user')
      date = models.DateTimeField(auto_now_add=True, null= True) 
  
  class Meta:
      verbose_name = 'Friend request'
      verbose_name_plural = 'Friend requests'
      ordering = ['-date']
  
  def __str__(self):
      return "from {}, to {}".format(self.from_user.username, self.to_user.username)
  </code></pre>
  
  <p>Views.py:</p>
  
  <pre><code>@login_required
  def cancel_friend_request_view(request, id):
      user = get_object_or_404(User, id=id)
      frequest = FriendRequest.objects.filter(from_user=request.user, to_user=user).first()
      frequest.delete()
      print(frequest)
  return HttpResponseRedirect(request.META.get('HTTP_REFERER'))
  </code></pre>