#22348: templates that extend admin/change_form throw difficult-to-track error
--------------------------+------------------------------------------------
Reporter: django@… | Owner: nobody
Type: | Status: new
Uncategorized | Version: 1.6
Component: Template | Keywords: template extends admin change_form
system | Has patch: 0
Severity: Normal | UI/UX: 0
Triage Stage: |
Unreviewed |
Easy pickings: 0 |
--------------------------+------------------------------------------------
The following template runs fine;
{% extends "admin/change_form.html" %}
{% block breadcrumbs %}
{% endblock %}
{% block content %}
Blah
{% endblock %}
However omitting the breadcrumbs block should be valid - you will just get
the breadcrumbs block from the parent;
{% extends "admin/change_form.html" %}
{% block content %}
Blah
{% endblock %}
however this throws a difficult to trace error;
NoReverseMatch at /admin/membership/reports/company/membershippaid/
Reverse for 'app_list' with arguments '()' and keyword arguments
'{u'app_label': ''}' not found. 1 pattern(s) tried:
[u'admin/(?P<app_label>\\w+)/$']
The admin/change_form.html template contains this;
{% url 'admin:app_list' app_label=opts.app_label %}
which i think is the code generating the error due to opts being empty.
It is possible that my system (upgraded from 1.2.3) is causing opts to be
blank - not sure how to test this, however putting [{{ opts }}] into the
template shows that opts is empty.
--
Ticket URL: <https://code.djangoproject.com/ticket/22348>
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/060.95c5fd03e208cf8b2912726a9f81e9e1%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.