mirror of
https://github.com/django/django.git
synced 2024-12-23 09:36:06 +00:00
Fixed #10298 -- Corrected the example for the get_list_or_404 shortcut. Thanks to Dagur for the report.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@9857 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
bd658cb814
commit
16d67a11ac
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user