On Sat, 2007-06-09 at 23:28 -0700, deerchao wrote: > I'm new to django, and I'm following tutorials on djangoproject.com. > Everything worked fine before I start using generic views. After > modifying polls/urls.py, the /polls/ page can't get any polls, and / > polls/1/ can't get any choices(there isn't a 404 error, but /polls/5/ > raises one), either.
Did you get this sorted out? It sounds like to me that things are working, just aren't being displayed in the template. Maybe you missed this part: "Change the template call from polls/detail.html to polls/poll_detail.html" However, since you don't get a "Template Doesn't Exist" error, I'm guessing poll_detail.html exists. This leads me to think this isn't set: "Go through your templates, and modify any reference to latest_poll_list to object_list, and change any reference to poll to object." So, double check that you have renamed poll to object (I know it sounds a little confusing). <h1>{{ poll.question }}</h1> <ul> {% for choice in poll.choice_set.all %} <li>{{ choice.choice }}</li> {% endfor %} </ul> To... <h1>{{ object.question }}</h1> <ul> {% for choice in object.choice_set.all %} <li>{{ choice.choice }}</li> {% endfor %} </ul> I think... --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---