mirror of
https://github.com/django/django.git
synced 2024-12-23 09:36:06 +00:00
Fixed ReST bug in [678]
git-svn-id: http://code.djangoproject.com/svn/django/trunk@679 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
b7528320b6
commit
eb3b1cfb81
@ -285,7 +285,7 @@ A shortcut: get_object_or_404()
|
|||||||
|
|
||||||
It's a very common idiom to use ``get_object()`` and raise ``Http404`` if the
|
It's a very common idiom to use ``get_object()`` and raise ``Http404`` if the
|
||||||
object doesn't exist. Django provides a shortcut. Here's the ``detail()`` view,
|
object doesn't exist. Django provides a shortcut. Here's the ``detail()`` view,
|
||||||
rewritten:
|
rewritten::
|
||||||
|
|
||||||
from django.core.extensions import get_object_or_404
|
from django.core.extensions import get_object_or_404
|
||||||
def detail(request, poll_id):
|
def detail(request, poll_id):
|
||||||
|
Loading…
Reference in New Issue
Block a user