#26911: RedirectView failing silently on NoReverseMatch is confusing
-------------------------------+--------------------
     Reporter:  Adys           |      Owner:  nobody
         Type:  Uncategorized  |     Status:  new
    Component:  Generic views  |    Version:  1.10
     Severity:  Normal         |   Keywords:
 Triage Stage:  Unreviewed     |  Has patch:  0
Easy pickings:  0              |      UI/UX:  0
-------------------------------+--------------------
 Relevant code:
 
https://github.com/django/django/blob/bc53af13cbf09b0cbac945426c2d51d0ca52fff3/django/views/generic/base.py#L176-L180
 (failing the if on line 196)

 I'm taking the time to open this ticket because this wasted me a lot of
 time. I had a typo in my `pattern_name`, which resulted in a 410 rather
 than an exception (as one would expect).

 The documentation only says a 410 will be returned if "the resulting
 location is empty, or the url argument is None", but doesn't mention that
 it can mask errors.

 This design should be reconsidered (per the zen of python, errors should
 never pass silently). Or at the very least, documented.

--
Ticket URL: <https://code.djangoproject.com/ticket/26911>
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/047.c6c1933bb6abfddc69357c3c8d00ce87%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to