> > I agree that the typo is also an issue and should be fixed, but that >> wouldn't result in the OP's error, since reverse() is complaining about a >> 'detail' URL specifically. The typo would result in a similar error when >> the result page is displayed, and would show 'guestion' as one of the >> kwargs. >> >> -James >> > No, it wouldn't, and the typo is the cause of the error. > > The error occurs when the results page is rendered. That page has a link > to the question. The url tag is trying to render that link: `{% url > "detail" question_id=question.id %}`. But there is no `question` variable > in the context, only `guestion`, so the question_id parameter to that URL > tag is blank. Hence the error. > -- > DR. > > Yep, you're right. I hadn't thought far enough back in my own train of thought. For some reason I had assumed that the OP just had {% url 'detail' %} somewhere in a template (probably because I had just run into a similar situation on a project), forgetting that the template system throws out invalid context variable references.
Thanks for the correction. -James -- 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. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CA%2Be%2BciXp6n8yqosHaLKQhhnLwpvuCVJ3LA7LRuUmiL0%3DDAOE_A%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.