Going throught the Django tutorial help pls

2014-08-01 Thread Michael Carey
I have: Enter code here...from django.shortcuts import render from django.template import RequestContext, loader from django.http import HttpResponse from polls.models import Poll def index(request): latest_poll_list = Poll.objects.get(name="Test") #Poll.objects.all().order_by('-pub_date')[

Re: Going throught the Django tutorial help pls

2014-08-01 Thread Collin Anderson
> > It currently shows a list of the polls, what I am trying to work out is > how to print out the integer value that is associated with that pole. Is poll.id what you want? In the template it would be {{ poll.id }} Or: Poll.objects.get(name="Test").id -- You received this message because yo

Re: Going throught the Django tutorial help pls

2014-08-01 Thread Michael Carey
On Saturday, 2 August 2014 12:55:25 UTC+10, Collin Anderson wrote: > > It currently shows a list of the polls, what I am trying to work out is >> how to print out the integer value that is associated with that pole. > > > Is poll.id what you want? In the template it would be {{ poll.id }} > > Or

Re: Going throught the Django tutorial help pls

2014-08-02 Thread Collin Anderson
What does the error say? -- 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+unsubscr...@googlegroups.com. To post to this group, send email to django-u

Re: Going throught the Django tutorial help pls

2014-08-02 Thread Michael Carey
FieldError at /polls/ Cannot resolve keyword 'name' into field. Choices are: choice, id, pub_date, question Request Method:G

Re: Going throught the Django tutorial help pls

2014-08-02 Thread Collin Anderson
Maybe try: Poll.objects.get(question="Test") -- 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+unsubscr...@googlegroups.com. To post to this group, s

Re: Going throught the Django tutorial help pls

2014-08-03 Thread Babatunde Akinyanmi
Perhaps you should show your model definition and the complete traceback. A wild guess though, did you syncdb? On 2 Aug 2014 20:23, "Michael Carey" wrote: > FieldError at /polls/ > > Cannot resolve keyword 'name' into field. Choices are: choice, id, pub_date, > question > > > > > > > > > > > >