Re: ValueError at /polls/1/vote/

2018-05-29 Thread Melvyn Sopacua
On dinsdag 29 mei 2018 14:07:59 CEST Caleb Bryson wrote: > def vote(request, question_id): > ... # same as above, no changes needed. You fell into the cut-and-paste-without-reading trap. -- Melvyn Sopacua -- You received this message because you are subscribed to the Google Groups "Django use

Re: ValueError at /polls/1/vote/

2018-05-29 Thread Caleb Bryson
How would I apply a return for my view here? from django.http import HttpResponseRedirect from django.shortcuts import get_object_or_404, render from django.urls import reverse from django.views import generic from .models import Choice, Question class IndexView(generic.ListView): template_name

Re: ValueError at /polls/1/vote/

2018-05-29 Thread Julio Biason
View require that you return an HttpResponse object. Your function does not (it probably even lacks a "return"). You need to return the response back in the view. On Tue, May 29, 2018 at 8:48 AM, Caleb Bryson wrote: > Hey i am getting this error now can anyone help me fix this? and what code >

Re: Django 1.8 tutorial-Chapter4: ValueError at /polls/1/vote/

2015-05-14 Thread Charito Romeo
Hi Alasdair, Thanks a lot for the help. It's working now. Cheers :) Charito On Thu, May 14, 2015 at 7:57 PM, Alasdair Nicol wrote: > On 14/05/15 02:50, charito.romeo wrote: > >> | >> > value="{{ >> choice.id }}"/> >> | >> > > The problem is that there is a new line in the middle of >

Re: Django 1.8 tutorial-Chapter4: ValueError at /polls/1/vote/

2015-05-14 Thread Alasdair Nicol
On 14/05/15 02:50, charito.romeo wrote: | | The problem is that there is a new line in the middle of "{{ choice.id }}". Change it to: value="{{ choice.id }}"/> Cheers, Alasdair -- Alasdair Nicol Developer, MEMSET mail: alasd...@memset.com web: http://www.memset.com/ Memset Lt

Django 1.8 tutorial-Chapter4: ValueError at /polls/1/vote/

2015-05-14 Thread charito.romeo
I am following the django 1.8 tutorial and I currently finished Part 4. My problem is when I tried to click on one of the radio buttons to vote, it gave me a ValueError below: ValueError at /polls/1/vote/ invalid literal for int() with base 10: '{{ choice.id }}'