Friday, April 25, 2014

Re: Django

In case you dont see my email, I copy my reply here too:

Hi, 

Your problem is in the results view function. I'm not sure what version of the tutorial you are following, but assuming you are using Django 1.6, the following:

def results(request, poll_id):
    poll = get_object_or_404(Poll, poll_id)
    return render(request, 'poll/results.html', {'poll':poll})

Should be:

def results(request, poll_id):
    poll = get_object_or_404(Poll, pk=poll_id)
    return render(request, 'poll/results.html', {'poll':poll})

Hope it helps. 

On Saturday, 19 April 2014 07:07:38 UTC+1, Srinivasulu Reddy wrote:

Hello folks,
                 I am new to python/django . i am earning myself i want to know effective way of learning python / django . i am following django book for django .  Light bird apps also.

So please anyone can help me to find the good way learn the python / django . I love to learn the python / django .

--
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 django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/c642a22d-e1be-4397-a154-4323e378bd2b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment