[Django] #27713: Clarify NoReverseMatch error message when view is not found

5 views
Skip to first unread message

Django

unread,
Jan 10, 2017, 8:28:32 AM1/10/17
to django-...@googlegroups.com
#27713: Clarify NoReverseMatch error message when view is not found
-------------------------------------+-------------------------------------
Reporter: Marten | Owner: Marten Kenbeek
Kenbeek |
Type: | Status: assigned
Cleanup/optimization |
Component: Core | Version: master
(URLs) |
Severity: Normal | Keywords:
Triage Stage: | Has patch: 0
Unreviewed |
Needs documentation: 0 | Needs tests: 0
Patch needs improvement: 0 | Easy pickings: 0
UI/UX: 0 |
-------------------------------------+-------------------------------------
If no view is found for a specific view name, the error message contains
the somewhat cryptic clue "0 pattern(s) tried: []". If you're not aware
what this means, this can easily throw you off the right track to fixing
this issue. Over the years I've seen a decent number of SO questions about
NoReverseMatch errors that seem to miss this fact.

I think we should clarify the error message when no view is found so it is
clear the error is in the view name, not in the arguments.

--
Ticket URL: <https://code.djangoproject.com/ticket/27713>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Jan 10, 2017, 9:01:28 AM1/10/17
to django-...@googlegroups.com
#27713: Clarify NoReverseMatch error message when view is not found
-------------------------------------+-------------------------------------
Reporter: Marten Kenbeek | Owner: Marten
Type: | Kenbeek
Cleanup/optimization | Status: assigned
Component: Core (URLs) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Marten Kenbeek):

* has_patch: 0 => 1


--
Ticket URL: <https://code.djangoproject.com/ticket/27713#comment:1>

Django

unread,
Jan 10, 2017, 9:18:09 AM1/10/17
to django-...@googlegroups.com
#27713: Clarify NoReverseMatch error message when view is not found
-------------------------------------+-------------------------------------
Reporter: Marten Kenbeek | Owner: Marten
Type: | Kenbeek
Cleanup/optimization | Status: assigned
Component: Core (URLs) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* stage: Unreviewed => Accepted


--
Ticket URL: <https://code.djangoproject.com/ticket/27713#comment:2>

Django

unread,
Jan 11, 2017, 2:52:30 PM1/11/17
to django-...@googlegroups.com
#27713: Clarify NoReverseMatch error message when view is not found
-------------------------------------+-------------------------------------
Reporter: Marten Kenbeek | Owner: Marten
Type: | Kenbeek
Cleanup/optimization | Status: assigned
Component: Core (URLs) | Version: master
Severity: Normal | Resolution:
Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham):

* stage: Accepted => Ready for checkin


--
Ticket URL: <https://code.djangoproject.com/ticket/27713#comment:3>

Django

unread,
Jan 11, 2017, 9:40:42 PM1/11/17
to django-...@googlegroups.com
#27713: Clarify NoReverseMatch error message when view is not found
-------------------------------------+-------------------------------------
Reporter: Marten Kenbeek | Owner: Marten
Type: | Kenbeek
Cleanup/optimization | Status: closed

Component: Core (URLs) | Version: master
Severity: Normal | Resolution: fixed

Keywords: | Triage Stage: Ready for
| checkin
Has patch: 1 | Needs documentation: 0

Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):

* status: assigned => closed
* resolution: => fixed


Comment:

In [changeset:"1358a67bf95cde86b09b689b4f10f2eeb642de31" 1358a67]:
{{{
#!CommitTicketReference repository=""
revision="1358a67bf95cde86b09b689b4f10f2eeb642de31"
Fixed #27713 -- Clarified NoReverseMatch error message when no view is
found.
}}}

--
Ticket URL: <https://code.djangoproject.com/ticket/27713#comment:4>

Reply all
Reply to author
Forward
0 new messages