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\\/(?P<app_label>auth|cupido)/$']
}}}
This is because Django now supports overriding
`admin/<app_label>/<model_name>/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.
* Attachment "Capture d’écran 2018-08-28 à 14.04.32.png" added.
* has_patch: 0 => 1
* component: contrib.admin => Documentation
* stage: Unreviewed => Accepted
Comment:
[https://github.com/django/django/pull/10353 PR]
--
Ticket URL: <https://code.djangoproject.com/ticket/29718#comment:1>
Comment (by Tim Graham):
#28935 could be the issue about the incorrect debug page location.
--
Ticket URL: <https://code.djangoproject.com/ticket/29718#comment:2>
* status: new => closed
* resolution: => fixed
Comment:
In [changeset:"166dec84069c15ecb2bc3a5590f872febdc4709c" 166dec84]:
{{{
#!CommitTicketReference repository=""
revision="166dec84069c15ecb2bc3a5590f872febdc4709c"
Fixed #29718 -- Doc'd admin template collision backwards incompatibility
in Django 2.1.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/29718#comment:3>
Comment (by Tim Graham <timograham@…>):
In [changeset:"c4559d0b39087e82a546c16e7412a7c097787bf0" c4559d0b]:
{{{
#!CommitTicketReference repository=""
revision="c4559d0b39087e82a546c16e7412a7c097787bf0"
[2.1.x] Fixed #29718 -- Doc'd admin template collision backwards
incompatibility in Django 2.1.
Backport of 166dec84069c15ecb2bc3a5590f872febdc4709c from master
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/29718#comment:4>