#29718: Small backwards-incompatibility in Django 2.1
+
Reporter: Aymeric Augustin | Owner: nobody
Type: Cleanup/optimization | Status: new
Component: contrib.admin |Version: 2.1
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 |
+
I have a `cupido.Device` Model and a corresponding ModelAdmin with a
custom view that renders a template called
`admin/cupido/device/search_form.html`.
After upgrading to Django 2.1, the changelist view crashes with a very
confusing error:
{{{
NoReverseMatch at /admin/cupido/device/
Reverse for 'app_list' with keyword arguments '{'app_label': ''}' not
found. 1 pattern(s) tried: ['admin\\/(?Pauth|cupido)/$']
}}}
This is because Django now supports overriding
`admin///search_form.html` and picks up my
template, which breaks because it was written for a completely different
purpose. This pitfall — the risk of collision with preexisting templates —
could be mentioned in the 2.1 release notes.
Furthermore, the debug view doesn't identify the correct line. It says
there's an error at line 11 (see attachment) but I couldn't identify any
template in which a line 11 contains a `{% url ... %}` tag that could
result in this error. I have no idea what's happening there; I couldn't
put together a good bug report for that problem.
--
Ticket URL: <https://code.djangoproject.com/ticket/29718>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/052.8f5b2d535e34e599b485ea80195bab8e%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.