User input error 405 Method Not Allowed (POST)

I'm stuck with Django form. I would like to have an input field on my DetailView page, that takes player score. Then I want to process this score in pythton function, but every time i get error 405 Method Not Allowed (POST)

html:

<h7><img style="width:2rem; height:2rem" src="{{ player.avatar.url }}"> {{player}}</h7>
        <form method="POST">
            {% csrf_token %}
            <input style = "width:2rem" type="text" id="{{player}}" name="score">
            <input type="submit" name="score" value="OK">
        </form>
{{ val }}

Form:

class GetScoreForm(Form):
    score = CharField() 

views

def get_score(request):
    if request.method == 'POST':
        form = GetScoreForm(request.POST)
        if form.is_valid():
            val = form.cleaned_data.get("score")
            # HERE I WANT TO PROCESS MY SCORE
    else:
        form = GetScoreForm()
    return render(request, 'tournamentdetailview.html', {'form': form}) ```
Back to Top