Django.fun

Get submit input in Django without forms

I have a page with several buttons, and only some appear depending on the scenario. More specifically, I have a user profile page that gives the user various buttons depending on their relationship to the user that they are viewing.

I determine which buttons to display by identifying the user's relationship with the user they are viewing, then use a series of if statements in the profile page to display the right buttons. For example, when the user is viewing a stranger, they have block and send friend request options. If they are viewing someone that is their friend, they have an unfriend and block option.

The backend needs to know that the user pressed the submit button, so that it can update the database. Using forms for this seems excessive, since I just need a simple submit input to reach the backend(no other user data). I am showing what I'm currently using below, but for some reason, it refuses to send a POST request at all.

Profile Template

      <h1>{{viewingName}}</h1>

      <img src="{{displayed_user.profile_picture.url}}" width="240">

      <p>{{displayed_user.bio}}</p>

      {% if areFriends %}

      <p>You're viewing your friend</p>
      <input type="submit" value="Remove Friendship" name ="remove_friends_form">
      <input type="submit" value="Block" name ="block_form">

      {% elif activeRequestTo %}

      <p>Friend Request Delivered. Awaiting response</p>

      {% elif activeRequestFrom %}

      <p>Incoming friend request</p>
      <input type="submit" value="Accept Friend Request" name ="accept_friend_form">
      <input type="submit" value="Reject Friend Request" name ="reject_friend_form">
      <input type="submit" value="Block" name ="block_form">

      {% elif viewingSelf %}

      <p>Viewing yourself</p>
      <input type="submit" value="Edit Profile" name ="edit_profile_form">

      {% else %}

      <p>Send a friend request</p>
      <input type="submit" value="Send Friend Request" name ="send_request_form">
      <input type="submit" value="Block" name ="block_form">

      {% endif %}


      <a href="/logout"><p>Logout</p></a>

Profile view(part that handles the incoming input)

if 'send_request_form' in request.POST:
        #Check if request.user is blocked by other user
        if Block.objects.is_blocked(request.user, displayed_user):
            return HttpResponse("this person has blocked you")
        Friend.objects.add_friend(request.user, displayed_user)
        return HttpResponse('test')

    if 'accept_friend_form' in request.POST:
        friend_request = FriendshipRequest.objects.get(from_user=displayed_user, to_user=request.user)
        friend_request.accept() 

    if 'reject_friend_form' in request.POST:
        friend_request = FriendshipRequest.objects.get(from_user=displayed_user, to_user=request.user)
        friend_request.reject()

    if 'remove_friends_form' in request.POST:
        Friend.objects.remove_friend(request.user, displayed_user)
    
    if 'block_form' in request.POST:
        Block.objects.add_block(request.user, displayed_user)

    if 'unblock_form' in request.POST:
        Block.objects.remove_block(request.user, displayed_user)

Thanks in advance for the help