On 07/08/2016 04:58 PM, James Schneider wrote:

> The polls,detail.html is:
>
> <h1>{{ question.question_text }}</h1>
>
> {% if error_message %}<p><strong>{{ error_message }}</strong></p>
> {% endif %}
>
> <form action="{% url 'polls:vote' question.id <http://question.id> %}" method="post">
>     {% csrf_token %}
>
>     {% for choice in question.choice_set.all %}
>         <input type="radio" name="choice"
>             id="choice{{forloop.counter }}"
>             value"{{ choice.id <http://choice.id> }}" />

It looks like your value attribute is missing an equals (=) sign. I think that the value is set to 'on' if the box is selected by the user and you haven't specified a value attribute.

If that's not it, can you post the entire traceback? This is an error from within the Django framework itself, likely from receiving a str value when it was expecting an int. The full traceback will hopefully tell us what portion of your code made the initial call.

-James

Thank you.

I mistyped the code string. and left out the = sign.. Things work as they should now. I guess I need to be a little more careful when proofing my code.

Thanks again

Gary Rl

--

You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected] <mailto:[email protected]>. To post to this group, send email to [email protected] <mailto:[email protected]>.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2Be%2BciWu76QWG4WTzr57T3euwRvi1eDwfFiUAT9q1wiWDSiP1Q%40mail.gmail.com <https://groups.google.com/d/msgid/django-users/CA%2Be%2BciWu76QWG4WTzr57T3euwRvi1eDwfFiUAT9q1wiWDSiP1Q%40mail.gmail.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.


--
You received this message because you are subscribed to the Google Groups "Django 
users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/ffd16516-6d2e-2597-f516-85eb6c4c96f6%40verizon.net.
For more options, visit https://groups.google.com/d/optout.

Reply via email to