Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed #10298 -- Corrected the example for the get_list_or_404 shortcu…

…t. Thanks to Dagur for the report.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@9857 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit 16d67a11ac69ed4ce5df5334fa2bf5cbc0768df9 1 parent bd658cb
@freakboy3742 freakboy3742 authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  docs/topics/http/shortcuts.txt
View
2  docs/topics/http/shortcuts.txt
@@ -148,6 +148,6 @@ This example is equivalent to::
from django.http import Http404
def my_view(request):
- my_objects = MyModel.objects.filter(published=True)
+ my_objects = list(MyModel.objects.filter(published=True))
if not my_objects:
raise Http404
Please sign in to comment.
Something went wrong with that request. Please try again.