#21435: Improved error message for reverse v. reverse_lazy
-------------------------------+--------------------
Reporter: elena | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 1.6
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
{{{
ImproperlyConfigured: The included urlconf %s doesn't have any patterns in
it.
}}}
Uninformative foremost as '''%s''' is top-level urls (problem usually in
included urls).
Caused by using '''reverse''' rather than '''reverse_lazy''' in some view.
No feedback whatsoever is given as to:
- that the error is caused in view rather than url
- which view this might be, or even which app it is in
'''Context:''' You get this error starting the developer server. The error
is cached (#11712) and fixing it doesn't make the error go away adding to
the confusion.[[BR]]
'''Suggestion:''' At least more specificity as to where the error lies.
Related tickets:
- https://code.djangoproject.com/ticket/17084
- https://code.djangoproject.com/ticket/15685
- https://code.djangoproject.com/ticket/11712
The above added here:
https://code.djangoproject.com/wiki/BetterErrorMessages
Appears be reproducible by adding to any view:
{{{
from django.core.urlresolvers import reverse
class DetailView(generic.DetailView):
...
attr = reverse('anything')
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/21435>
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 post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/048.88240e51343a2f6bf25af27bdf477cc9%40djangoproject.com.
For more options, visit https://groups.google.com/groups/opt_out.