#17076: Report the number of patterns tried when reversing --------------------------------------+--------------------- Reporter: wilfred@… | Owner: nobody Type: Cleanup/optimization | Status: new Component: Core (Other) | Version: 1.3 Severity: Normal | Keywords: reverse Triage Stage: Unreviewed | Has patch: 1 Easy pickings: 0 | UI/UX: 0 --------------------------------------+--------------------- Relevant django-dev discussion: http://groups.google.com/group/django- developers/browse_thread/thread/d3bcc13fff8d7320
It would be great to know which patterns were tested when `NoReverseMatch` is thrown. This would help distinguish between "I've typed the URL name incorrectly" and "I've missed a keyword argument for this URL". Patch attached, I would welcome feedback. The current patch produces the following exception if the URL name is wrong: `NoReverseMatch: Reverse for 'incorrect_url_name' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []` And the following exception if a keyword argument is missing: `NoReverseMatch: Reverse for 'needs_exactly_one_kwargs' with arguments '()' and keyword arguments '{}' not found. 1 pattern(s) tried: ['user/(?P<user_id>\\d+)/update/$']` -- Ticket URL: <https://code.djangoproject.com/ticket/17076> 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 post to this group, send email to django-updates@googlegroups.com. To unsubscribe from this group, send email to django-updates+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-updates?hl=en.