DEBUG on, Django generates fancy debug error pages in two circumstances:
django.http.Http404exception is raised
In the latter case, the debug page contains a tremendous amount of information about the error, the request that caused it, and the environment at the time it occurred. Deciphering this page and making best use of the information it presents will be covered in the next chapter. The debug pages for
Http404 exceptions are considerably simpler and will be covered here.
To see examples of the
Http404 debug pages, consider the
survey_detail view from Chapter 4:
def survey_detail(request, pk): survey = get_object_or_404(Survey, ...