Code

Ticket #11357: admindocs-m2m.diff

File admindocs-m2m.diff, 641 bytes (added by ubernostrum, 5 years ago)
Line 
1Index: django/contrib/admindocs/views.py
2===================================================================
3--- django/contrib/admindocs/views.py   (revision 11091)
4+++ django/contrib/admindocs/views.py   (working copy)
5@@ -233,7 +233,7 @@
6             })
7 
8     # Gather related objects
9-    for rel in opts.get_all_related_objects():
10+    for rel in opts.get_all_related_objects() + opts.get_all_related_many_to_many_objects():
11         verbose = _("related `%(app_label)s.%(object_name)s` objects") % {'app_label': rel.opts.app_label, 'object_name': rel.opts.object_name}
12         accessor = rel.get_accessor_name()
13         fields.append({