diff options
| author | Alex Gaynor <alex.gaynor@gmail.com> | 2010-11-17 20:04:49 +0000 |
|---|---|---|
| committer | Alex Gaynor <alex.gaynor@gmail.com> | 2010-11-17 20:04:49 +0000 |
| commit | 030fdcc7c8e36f4a1c780dd974cbefe83ce202e8 (patch) | |
| tree | 766734658a085eacddd944c90a874ee82f64d964 /docs | |
| parent | 1aaf270d73e42b28edace569575712cb2cbf1ef6 (diff) | |
[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
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/topics/http/urls.txt | 3 | ||||
| -rw-r--r-- | docs/topics/http/views.txt | 2 |
2 files changed, 5 insertions, 0 deletions
diff --git a/docs/topics/http/urls.txt b/docs/topics/http/urls.txt index d176bbafae..631e0ebe48 100644 --- a/docs/topics/http/urls.txt +++ b/docs/topics/http/urls.txt @@ -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:: diff --git a/docs/topics/http/views.txt b/docs/topics/http/views.txt index 399e6b6ad1..3ff11da1e9 100644 --- a/docs/topics/http/views.txt +++ b/docs/topics/http/views.txt @@ -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:: |
