#34691: Add a system check for unmatched URL paths' < / >
------------------------------------------------+------------------------
Reporter: Adam Johnson | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: Core (URLs) | Version: dev
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
------------------------------------------------+------------------------
Currently, unmatched angle brackets are silently ignored:
{{{
path('<int:question_id/vote/', views.vote, name='vote'),
}}}
This leads to a frustrating debugging experience, where a 404 or
`NoReverseMatch` could occur and only the eagle-eyed could spot why.
Similar to the `^`/`$` system check added in #28663, I propose a new check
in `RoutePattern.check()` for unmatched `<` or `>`. It's rather unlikely
those characters are legitimately used in URLs.
(Inspired by [https://forum.djangoproject.com/t/noreversematch-at-end-of-
tutorial-4/6513/9 a new user making this mistake] and asking for help on
the forum.)
--
Ticket URL: <https://code.djangoproject.com/ticket/34691>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/010701891c0075de-d98078e3-663c-42f9-b76f-30f26d1daf54-000000%40eu-central-1.amazonses.com.