Thomas, like I explained to Mauro it was just confusing. Really I should 
have known the problem, I was working on it all last night and I guess I 
needed a break. That said, the tutorial is not clear. In line with the rest 
of the tutorial they should have used 1, vice 34. It works perfect with 1.

Thanks for the help, and that shell trick was quite helpful.

On Wednesday, August 21, 2013 10:50:18 AM UTC-3, Thomas wrote:
>
>
> On 2013-08-20, at 9:02 PM, Diek Kearney <diekro...@gmail.com <javascript:>> 
> wrote:
>
> I am going through the Tutorial Django 1.5 Tutorial Part 3, and up to the 
> current point everything was running smoothly, then I hit a wall that I 
> cannot figure out. Maybe I am too focused on following, anyways I need some 
> help.
> ...
> The next step is "Take a look in your browser, at “/polls/34/”. It’ll run 
> the detail() method and display whatever ID you provide in the URL. Try 
> “/polls/34/results/” and “/polls/34/vote/” too – these will display the 
> placeholder results and voting pages." I tried and nothing. It generates 
> a 404 error. Where exactly is the 34 coming from? I like to think things 
> through but as a beginner in django following a tutorial I need more when 
> it comes to this section.
>
>
>
> Hmm. This *is* confusing since the tutorial should call out the "34" as an 
> example but does not. And at that point in the tutorial it has not given 
> you instruction to enter a particular poll, and not shown you how to get 
> the poll id for any poll you actually did enter.
>
> I was going to suggest that you go to "/polls" to see a list of available 
> polls, but at that point in the tutorial the view for that does not yet 
> exist so no luck there either.
>
> You can try something like:
>
>   python manage.py shell
>     from polls.models import Poll
>     Poll.objects.all().values()
>
> which will give you a keyword:value list of all fields in your poll model, 
> including the "id" field. That is the value to use in their example query, 
> not the arbitrary "34". Once you have the id (primary key) for a poll, you 
> can try the detailed view which they *have* defined!
>
> You can also look in the database itself for the same info. Try
>
>   python manage.py dbshell
>     select * from polls_poll;
>
> hth
>
>                   - Tom
>
>

-- 
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-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to