title: What generic view should be used to create friend request in drf?
body: <p>I am building a drf backend api for my android app. I need the API to be able to send friend requests to the relevant users from a user. To do this I am using the <a href="https://github.com/revsys/django-friendship" rel="nofollow noreferrer">django-friendship</a> library. In their documentation they say:</p>
  
  <blockquote>
    <p>Create a friendship request:</p>
  </blockquote>
  
  <pre><code>other_user = User.objects.get(pk=1)
  Friend.objects.add_friend(
      request.user,                               # The sender
      other_user,                                 # The recipient
      message='Hi! I would like to add you')      # This message is optional
  </code></pre>
  
  <p>My question is where should this code be written. I know that it belongs in a view, but what kind of view? Could someone give me an example?</p>