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
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
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
>
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
>
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
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 }}'
6 matches
Mail list logo