Kaydet (Commit) 204253ed authored tarafından Alex Gaynor's avatar Alex Gaynor

Fixed #14713 -- documented that resolve can raise Http404. Thanks to Adam for the patch.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@14603 bcc190cf-cafb-0310-a4f2-bffc1f526a37
üst fc47f8c6
...@@ -837,6 +837,9 @@ worry about the ``urlconf`` parameter. The function returns a ...@@ -837,6 +837,9 @@ worry about the ``urlconf`` parameter. The function returns a
:class:`django.core.urlresolvers.ResolverMatch` object that allows you :class:`django.core.urlresolvers.ResolverMatch` object that allows you
to access various meta-data about the resolved URL. to access various meta-data about the resolved URL.
If the URL does not resolve, the function raises an
:class:`~django.http.Http404` exception.
.. class:: ResolverMatch() .. class:: ResolverMatch()
.. attribute:: ResolverMatch.func .. attribute:: ResolverMatch.func
......
...@@ -95,6 +95,8 @@ to handle those errors. ...@@ -95,6 +95,8 @@ to handle those errors.
The Http404 exception The Http404 exception
--------------------- ---------------------
.. class:: django.http.Http404()
When you return an error such as ``HttpResponseNotFound``, you're responsible When you return an error such as ``HttpResponseNotFound``, you're responsible
for defining the HTML of the resulting error page:: for defining the HTML of the resulting error page::
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment