Ticket #7923: admin-rawid-link.diff
File admin-rawid-link.diff, 788 bytes (added by , 16 years ago) |
---|
-
django/contrib/admin/widgets.py
118 118 return mark_safe(u''.join(output)) 119 119 120 120 def label_for_value(self, value): 121 return ' <strong>%s</strong>' % \ 122 truncate_words(self.rel.to.objects.get(pk=value), 14) 121 obj = self.rel.to.objects.get(pk=value) 122 return ' <strong><a href="../../../%s/%s/%s/">%s</a></strong>' % \ 123 (obj._meta.app_label, 124 obj._meta.object_name.lower(), 125 obj.pk, 126 truncate_words(obj, 14)) 123 127 124 128 class ManyToManyRawIdWidget(ForeignKeyRawIdWidget): 125 129 """