#30600: Django is silence on ValueError in converter to_python() method.
-------------------------------------+-------------------------------------
     Reporter:  Fraterius            |                    Owner:  nobody
         Type:                       |                   Status:  closed
  Cleanup/optimization               |
    Component:  Core (URLs)          |                  Version:  master
     Severity:  Normal               |               Resolution:  wontfix
     Keywords:  url pattern          |             Triage Stage:
  converter regexp                   |  Unreviewed
    Has patch:  0                    |      Needs documentation:  0
  Needs tests:  0                    |  Patch needs improvement:  0
Easy pickings:  0                    |                    UI/UX:  0
-------------------------------------+-------------------------------------
Changes (by felixxm):

 * status:  new => closed
 * resolution:   => wontfix
 * version:  2.2 => master
 * type:  Uncategorized => Cleanup/optimization


Comment:

 Thanks for the report, however this is
 [https://docs.djangoproject.com/en/2.2/topics/http/urls/#registering-
 custom-path-converters documented],
 
[https://github.com/django/django/blob/26d16c07fdc4a297daca554afa6375c70d6d82a9/tests/urlpatterns/tests.py#L208-L213
 tested], and
 [https://github.com/django/django/pull/7482#issuecomment-259520026
 expected behavior].

 The assumption is that `to_python()` in custom converters will raise
 `ValueError` if it cannot convert the given value which means no match and
 404 as a consequence.

-- 
Ticket URL: <https://code.djangoproject.com/ticket/30600#comment:2>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

-- 
You received this message because you are subscribed to the Google Groups 
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.42f000cdc9eab1b6494efb1dc342234c%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to