Reverse urlresolver raises obscure exceptions on failure
|Reported by:||Owned by:||nobody|
|Severity:||Normal||Keywords:||reverse urls exception 'unbalanced parenthesis'|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
Related to ticket #2977.
reverse fails to reverse a complex regex obscure errors can be raised. For instance, reversing the url
r'^(\d(\d)?)/$' causes an 'unbalanced parenthesis' to be raised from
The urlresolver is clearly in flux right now; however, this error could be very difficult for someone new to Django (read, me) to understand. Better exception catching that notifies when a url isn't supported by
reverse would be very helpful.