1
0
mirror of https://github.com/django/django.git synced 2025-07-17 16:19:12 +00:00

[1.0.X] Fixed #11556 -- Clarified the argument required by get_object_or_404. Thanks to rbonvall for the report.

Merge of r11344 from trunk.


git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.0.X@11347 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
Russell Keith-Magee 2009-07-28 14:41:45 +00:00
parent ca530f27c9
commit 892ef07ac7

View File

@ -326,8 +326,8 @@ shortcut. Here's the ``detail()`` view, rewritten::
return render_to_response('polls/detail.html', {'poll': p})
The :func:`~django.shortcuts.get_object_or_404` function takes a Django model
module as its first argument and an arbitrary number of keyword arguments, which
it passes to the module's :meth:`~django.db.models.QuerySet.get` function. It
as its first argument and an arbitrary number of keyword arguments, which it
passes to the module's :meth:`~django.db.models.QuerySet.get` function. It
raises :exc:`~django.http.Http404` if the object doesn't exist.
.. admonition:: Philosophy