Skip to content

Commit

Permalink
Fixed #10298 -- Corrected the example for the get_list_or_404 shortcu…
Browse files Browse the repository at this point in the history
…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
freakboy3742 committed Feb 22, 2009
1 parent bd658cb commit 16d67a1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion docs/topics/http/shortcuts.txt
Expand Up @@ -148,6 +148,6 @@ This example is equivalent to::
from django.http import Http404 from django.http import Http404


def my_view(request): def my_view(request):
my_objects = MyModel.objects.filter(published=True) my_objects = list(MyModel.objects.filter(published=True))
if not my_objects: if not my_objects:
raise Http404 raise Http404

0 comments on commit 16d67a1

Please sign in to comment.