Changeset 3356
- Timestamp:
- 07/17/06 09:16:17 (2 years ago)
- Files:
-
- django/trunk/docs/tutorial03.txt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/docs/tutorial03.txt
r3017 r3356 289 289 ------------------------------- 290 290 291 It's a very common idiom to use ``get _object()`` and raise ``Http404`` if the291 It's a very common idiom to use ``get()`` and raise ``Http404`` if the 292 292 object doesn't exist. Django provides a shortcut. Here's the ``detail()`` view, 293 293 rewritten:: … … 314 314 315 315 There's also a ``get_list_or_404()`` function, which works just as 316 ``get_object_or_404()`` -- except using `` get_list()`` instead of317 ``get _object()``. It raises ``Http404`` if the list is empty.316 ``get_object_or_404()`` -- except using ``filter()`` instead of 317 ``get()``. It raises ``Http404`` if the list is empty. 318 318 319 319 Write a 404 (page not found) view
