diff --git a/docs/topics/http/shortcuts.txt b/docs/topics/http/shortcuts.txt index b60ccdd59a..d68faee258 100644 --- a/docs/topics/http/shortcuts.txt +++ b/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