File tree Expand file tree Collapse file tree 3 files changed +13
-11
lines changed
polymorphic_tree/templates/admin/polymorphic_tree Expand file tree Collapse file tree 3 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ Changes in git
22--------------
33
44* Fixed URL resolving for for multi admin sites.
5+ * Fixed URL breadcrumbs for delete page, visible when using non-standard delete URLs (e.g. django-parler _'s delete translation page).
56* Enforcing at least django-polymorphic _ 0.7.1 for Django 1.8 compatibility.
67
78
@@ -145,6 +146,7 @@ and not bother with a plugin registration system.
145146
146147
147148.. _django-fluent-pages : https://github.com/edoburu/django-fluent-pages
149+ .. _django-parler : https://github.com/edoburu/django-parler
148150.. _django-polymorphic : https://github.com/chrisglass/django_polymorphic
149151.. _django-tag-parser : https://github.com/edoburu/django-tag-parser
150152
Original file line number Diff line number Diff line change 11{% extends "admin/change_form.html" %}
2- {% load i18n admin_modify polymorphic_admin_tags polymorphic_tree_admin_tags %}
2+ {% load i18n admin_modify admin_urls polymorphic_admin_tags polymorphic_tree_admin_tags %}
33
44{# Add tree levels to polymorphic breadcrumb #}
55{% block breadcrumbs %}{% if not is_popup %}{% breadcrumb_scope base_opts %}
66< div class ="breadcrumbs ">
7- < a href ="../../../ "> {% trans "Home" %}</ a > ›
8- < a href ="../../ "> {{ app_label|capfirst|escape }}</ a > ›
9- {% if has_change_permission %}< a href ="../ "> {{ opts.verbose_name_plural|capfirst }}</ a > {% else %}{{ opts.verbose_name_plural|capfirst }}{% endif %} ›
7+ < a href ="{% url 'admin:index' %} "> {% trans "Home" %}</ a > ›
8+ < a href ="{% url 'admin:app_list' app_label=app_label %} "> {{ app_label|capfirst|escape }}</ a > ›
9+ {% if has_change_permission %}< a href ="{% url opts|admin_urlname:'changelist' %} "> {{ opts.verbose_name_plural|capfirst }}</ a > {% else %}{{ opts.verbose_name_plural|capfirst }}{% endif %} ›
1010 {% for p in original|mptt_breadcrumb %}
11- < a href ="../{{ p.id }}/ "> {{ p }}</ a > ›
11+ < a href ="{% url opts|admin_urlname:'change' p.id %} "> {{ p.title }}</ a > ›
1212 {% endfor %}
1313 {% if add %}{% trans "Add" %} {{ opts.verbose_name }}{% else %}{{ original|truncatewords:"18" }}{% endif %}
1414</ div >
Original file line number Diff line number Diff line change 11{% extends "admin/delete_confirmation.html" %}
2- {% load i18n polymorphic_admin_tags polymorphic_tree_admin_tags %}
2+ {% load i18n admin_urls polymorphic_admin_tags polymorphic_tree_admin_tags %}
33
44{# Add tree levels to polymorphic breadcrumb #}
55{% block breadcrumbs %}{% breadcrumb_scope base_opts %}
66< div class ="breadcrumbs ">
7- < a href ="../../../../ "> {% trans "Home" %}</ a > ›
8- < a href ="../../../ "> {{ app_label|capfirst|escape }}</ a > ›
9- < a href ="../../ "> {{ opts.verbose_name_plural|capfirst }}</ a > ›
7+ < a href ="{% url 'admin:index' %} "> {% trans "Home" %}</ a > ›
8+ < a href ="{% url 'admin:app_list' app_label=app_label %} "> {{ app_label|capfirst|escape }}</ a > ›
9+ < a href ="{% url opts|admin_urlname:'changelist' %} "> {{ opts.verbose_name_plural|capfirst }}</ a > ›
1010 {% for p in object|mptt_breadcrumb %}
11- < a href ="../{{ p.id }}/ "> {{ p.title }}</ a > ›
11+ < a href ="{% url opts|admin_urlname:'change' p.id %} "> {{ p.title }}</ a > ›
1212 {% endfor %}
13- < a href ="../ "> {{ object|truncatewords:"18" }}</ a > ›
13+ < a href ="{% url opts|admin_urlname:'change' object.id %} "> {{ object|truncatewords:"18" }}</ a > ›
1414 {% trans 'Delete' %}
1515</ div >
1616{% endbreadcrumb_scope %}{% endblock %}
You can’t perform that action at this time.
0 commit comments