mirror of
https://github.com/django/django.git
synced 2025-07-04 17:59:13 +00:00
[1.2.X] Fixed #14713 -- documented that resolve can raise Http404. Thanks to Adam for the patch. Backport of [14603].
git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@14604 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
1aaf270d73
commit
030fdcc7c8
@ -834,6 +834,9 @@ URL paths to the corresponding view functions. It has the following signature:
|
||||
don't need to worry about the ``urlconf`` parameter. The function returns the
|
||||
triple (view function, arguments, keyword arguments).
|
||||
|
||||
If the URL does not resolve, the function raises an
|
||||
:class:`~django.http.Http404` exception.
|
||||
|
||||
For example, it can be used for testing if a view would raise a ``Http404``
|
||||
error before redirecting to it::
|
||||
|
||||
|
@ -95,6 +95,8 @@ to handle those errors.
|
||||
The Http404 exception
|
||||
---------------------
|
||||
|
||||
.. class:: django.http.Http404()
|
||||
|
||||
When you return an error such as ``HttpResponseNotFound``, you're responsible
|
||||
for defining the HTML of the resulting error page::
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user