Page doesn't redirect correctly
Question: I'm learning django with myself and when I was following the tutorial [Writing
your first Django app, part
4](https://docs.djangoproject.com/en/1.9/intro/tutorial04/) today, I met this
problem.(I'm using django 1.9.7 and Python 3.5.2 64-bit and PyCharm)

When I select a choice and click the button Vote, it supposes to be redirected
to the results page, but I get the error message:"You didn't select a choice"
which is supposes to occur when I don't select any choices all the time. And I
have checked my codes, I figured something must went wrong with the function
vote, but I don't know the reason.

polls\view.py

    
    
    def vote(request, question_id):
        question = get_object_or_404(Question, pk=question_id)
        try:
            selected_choice = question.choice_set.get(pk=request.POST['choice'])
        except(KeyError, Choice.DoesNotExist):
            return render(request, 'polls/detail.html', {
                'question': question,
                'error_message': "You didn't select a choice.",
            })
        else:
            selected_choice.votes += 1
            selected_choice.save()
            return HttpResponseRedirect(reverse('polls:results',args=(question.id,)))
    

polls\urls.py

    
    
    from django.conf.urls import url
    from . import views
    
    app_name = 'polls'
    urlpatterns = [
        url(r'^$', views.index, name = 'index'),
        url(r'^(?P<question_id>[0-9]+)/$', views.detail, name='detail'),
        url(r'^(?P<question_id>[0-9]+)/results/$', views.results, name='results'),
        url(r'^(?P<question_id>[0-9]+)/vote/$', views.vote, name='vote'),
    ]
    

polls\template\polls\detail.html

    
    
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title></title>
    </head>
    <body>
    <h1>{{ question.question_text }}</h1>
    
    {% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif %}
    
    <form action="{% url 'polls:vote' question.id %}" methon="post">
    {% csrf_token %}
    {% for choice in question.choice_set.all %}
        <input type="radio" name="choice" id="choice{{ forloop.counter }}" value="{{ choice.id }}" />
        <label for="choice{{ forloop.counter }}">{{ choice.choice_text }}</label><br />
    {% endfor %}
    <input type="submit" value="Vote" />
    </form>
    </body>
    </html>
    


Answer: Sorry for wasting all your time. It was a typo which caused the problem.

polls\template\polls\detail.html `<form action="{% url 'polls:vote'
question.id %}" methon="post">`

`methon` should be `method`, and the problem has been solved.

