diff options
| author | sp1rs <shashank.parekh@healthifyme.com> | 2019-07-03 23:30:18 +0530 |
|---|---|---|
| committer | Mariusz Felisiak <felisiak.mariusz@gmail.com> | 2019-07-04 13:36:10 +0200 |
| commit | 0ea952e3d65f3e9e2d63fc2153a8cc20f791b550 (patch) | |
| tree | c3bbcad96bb2f48b32e858b4edca96dfbeaabde8 | |
| parent | 7d52d056e370734f3938d7cf3ab30e06205f1f85 (diff) | |
[2.2.x] Fixed #30600 -- Clarified that ValueError raised by converter.to_python() means no match.
Backport of f197c3dd9130b18397022605c27ffe5755f329d7 from master
| -rw-r--r-- | docs/topics/http/urls.txt | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/docs/topics/http/urls.txt b/docs/topics/http/urls.txt index 3a17a45322..ed7257d847 100644 --- a/docs/topics/http/urls.txt +++ b/docs/topics/http/urls.txt @@ -146,7 +146,9 @@ A converter is a class that includes the following: * A ``to_python(self, value)`` method, which handles converting the matched string into the type that should be passed to the view function. It should - raise ``ValueError`` if it can't convert the given value. + raise ``ValueError`` if it can't convert the given value. A ``ValueError`` is + interpreted as no match and as a consequence a 404 response is sent to the + user. * A ``to_url(self, value)`` method, which handles converting the Python type into a string to be used in the URL. |
