Fixed #8547 -- Corrected the breadcrumb display in the object_history.html template. Thanks sorl for catching this.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@8555 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
834ce902c2
commit
853f4d29b8
|
@ -702,6 +702,7 @@ class ModelAdmin(BaseModelAdmin):
|
||||||
from django.contrib.admin.models import LogEntry
|
from django.contrib.admin.models import LogEntry
|
||||||
model = self.model
|
model = self.model
|
||||||
opts = model._meta
|
opts = model._meta
|
||||||
|
app_label = opts.app_label
|
||||||
action_list = LogEntry.objects.filter(
|
action_list = LogEntry.objects.filter(
|
||||||
object_id = object_id,
|
object_id = object_id,
|
||||||
content_type__id__exact = ContentType.objects.get_for_model(model).id
|
content_type__id__exact = ContentType.objects.get_for_model(model).id
|
||||||
|
@ -714,6 +715,7 @@ class ModelAdmin(BaseModelAdmin):
|
||||||
'module_name': capfirst(force_unicode(opts.verbose_name_plural)),
|
'module_name': capfirst(force_unicode(opts.verbose_name_plural)),
|
||||||
'object': obj,
|
'object': obj,
|
||||||
'root_path': self.admin_site.root_path,
|
'root_path': self.admin_site.root_path,
|
||||||
|
'app_label': app_label,
|
||||||
}
|
}
|
||||||
context.update(extra_context or {})
|
context.update(extra_context or {})
|
||||||
return render_to_response(self.object_history_template or [
|
return render_to_response(self.object_history_template or [
|
||||||
|
|
|
@ -2,7 +2,13 @@
|
||||||
{% load i18n %}
|
{% load i18n %}
|
||||||
|
|
||||||
{% block breadcrumbs %}
|
{% block breadcrumbs %}
|
||||||
<div class="breadcrumbs"><a href="../../../../">{% trans 'Home' %}</a> › <a href="../../">{{ module_name }}</a> › <a href="../">{{ object|truncatewords:"18" }}</a> › {% trans 'History' %}</div>
|
<div class="breadcrumbs">
|
||||||
|
<a href="../../../../">{% trans 'Home' %}</a> ›
|
||||||
|
<a href="../../../">{{ app_label|capfirst|escape }}</a> ›
|
||||||
|
<a href="../../">{{ module_name }}</a> ›
|
||||||
|
<a href="../">{{ object|truncatewords:"18" }}</a> ›
|
||||||
|
{% trans 'History' %}
|
||||||
|
</div>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
Loading…
Reference in New Issue