mirror of
https://github.com/django/django.git
synced 2025-10-24 06:06:09 +00:00
Fixed #24143 -- Encouraged use of Http404 messages for debugging.
This commit is contained in:
@@ -442,7 +442,7 @@ for a given poll. Here's the view:
|
||||
try:
|
||||
question = Question.objects.get(pk=question_id)
|
||||
except Question.DoesNotExist:
|
||||
raise Http404
|
||||
raise Http404("Question does not exist")
|
||||
return render(request, 'polls/detail.html', {'question': question})
|
||||
|
||||
The new concept here: The view raises the :exc:`~django.http.Http404` exception
|
||||
|
||||
Reference in New Issue
Block a user