Thursday, January 19, 2017

RedirectView failing silently on NoReverseMatch is confusing

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.

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@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.

No comments:

Post a Comment