RedirectView failing silently on NoReverseMatch is confusing

13 views
Skip to first unread message

Grzegorz Tężycki

unread,
Jan 19, 2017, 7:17:03 AM1/19/17
to Django users
Hi everyone.

Tim Graham told me that problem with ticet: #26911 should be discuss on mailing list.
Details of ticket are here : https://code.djangoproject.com/ticket/26911

When developer set 'pattern_name' in RedirectView and this pattern is incorrect, then method catch NoReverseMatch exception and return None.

I think, that method get_redirect_url should raise ImproperlyConfigured error with
message "Reverse URL for 'xxxx' not found.", or NoReverseMatch exception not should be catch

What you think about this.

Matthew Pava

unread,
Jan 19, 2017, 9:19:06 AM1/19/17
to django...@googlegroups.com

It looks like Tim wanted you to talk to the Django Developers list.  This is the Django Users list.

 

Stating that, I think the NoReverseMatch exception should not be caught.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/65f3947f-6d28-41d7-ac83-df6209f621dc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages