﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
18880	[Documentation error] Raising error 404 section is wrong	devesh.gupta@…	nobody	"As per the code and text in written in tutorial 3, ""Raising error 404"": it is using ""DoesNotExist"" catch the exception.

This will not work, because exception which is raised when accessing a non-existing template is '''<class 'django.template.base.TemplateDoesNotExist'>'''

Instead of DoesNotExist, it should be:

def detail(request, poll_id):
        try:
                p = Poll.objects.get(pk=poll_id)
                return render_to_response('polls/detail.html', {'poll': p})
        except TemplateDoesNotExist:
                raise Http404
"	Bug	closed	Documentation	1.3	Normal	invalid	DoesNotExist exception		Unreviewed	0	0	0	0	0	0
