Hi Strat, Tom is right - the issue is the name of the view in your template. Reverse takes the name of your view and builds it's url. In this case, you are calling the view 'detail/' (with a trailing slash) instead of 'detail'.
Cheers, Lloyd On Fri, Jun 14, 2013 at 3:42 PM, Tom Evans <tevans...@googlemail.com> wrote: > On Fri, Jun 14, 2013 at 10:12 AM, Strat Parrott <st...@thejuncture.com> > wrote: > > > > > > I have done the tutorial three times and everything is fine up until I > get > > to Tutorial 3 > > https://docs.djangoproject.com/en/1.5/intro/tutorial03/ > > > > > > I must be missing something but at this point I've done it all three > times > > so I'm not sure what the issue is. I've tried looking up solutions to 'No > > reverse' and they are beyond me at this time. > > > > > > >>> > > > > Now let’s update our index view in polls/views.py to use the template: > > > > from django.http import HttpResponse > > from django.template import Context, loader > > > > from polls.models import Poll > > > > def index(request): > > latest_poll_list = Poll.objects.order_by('-pub_date')[:5] > > template = loader.get_template('polls/index.html') > > context = Context({ > > 'latest_poll_list': latest_poll_list, > > }) > > return HttpResponse(template.render(context)) > > > > That code loads the template called polls/index.html and passes it a > > context. The context is a dictionary mapping template variable names to > > Python objects. > > > > Load the page by pointing your browser at “/polls/”, and you should see a > > bulleted-list containing the “What’s up” poll from Tutorial 1. The link > > points to the poll’s detail page. > > > > <<< > > > > > > Once I set that view I get > > > > > > NoReverseMatch at /polls/ > > > > Reverse for 'detail/' with arguments '(2L,)' and keyword arguments '{}' > > not found. > > > > Request Method:GET > > Request URL:http://127.0.0.1:8000/polls/ > > Django Version:1.5.1 > > Exception Type:NoReverseMatch > > Exception Value: > > > > Reverse for 'detail/' with arguments '(2L,)' and keyword arguments '{}' > > not found. > > > What name did you give the url in your urls.py? Was it "detail/" or > was it "detail". > > Cheers > > 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. > > > -- Regards, Sithu Lloyd Dube -- 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.