1
0
mirror of https://github.com/django/django.git synced 2025-10-24 14:16:09 +00:00

Fixed #24624 -- Replaced obsoleted rel.opts in admindocs view

Thanks Scott Sanders for the report, and Markus Holtermann and
Tim Graham for the reviews. Refs #24381.
This commit is contained in:
Claude Paroz
2015-04-11 11:07:13 +02:00
parent a7bc00e17b
commit 4e7ed8d0d3
3 changed files with 20 additions and 2 deletions

View File

@@ -266,8 +266,8 @@ class ModelDetailView(BaseAdminDocsView):
# Gather related objects
for rel in opts.related_objects:
verbose = _("related `%(app_label)s.%(object_name)s` objects") % {
'app_label': rel.opts.app_label,
'object_name': rel.opts.object_name,
'app_label': rel.related_model._meta.app_label,
'object_name': rel.related_model._meta.object_name,
}
accessor = rel.get_accessor_name()
fields.append({