Ticket #1196: atterror.diff
File atterror.diff, 1.8 KB (added by , 19 years ago) |
---|
-
django/contrib/admin/views/main.py
592 592 else: 593 593 # Display a link to the admin page. 594 594 nh(deleted_objects, current_depth, ['%s: <a href="../../../../%s/%s/%s/">%s</a>' % \ 595 (capfirst(related.opts.verbose_name), related.opts.app_label, related.opts.module_name, sub_obj.id, strip_tags(str(sub_obj))), []])595 (capfirst(related.opts.verbose_name), related.opts.app_label, related.opts.module_name, getattr(sub_obj, '%s' % sub_obj._meta.pk.attname), strip_tags(str(sub_obj))), []]) 596 596 _get_deleted_objects(deleted_objects, perms_needed, user, sub_obj, related.opts, current_depth+2) 597 597 # If there were related objects, and the user doesn't have 598 598 # permission to delete them, add the missing perm to perms_needed. … … 618 618 nh(deleted_objects, current_depth, [ 619 619 (_('One or more %(fieldname)s in %(name)s:') % {'fieldname': related.field.name, 'name':related.opts.verbose_name}) + \ 620 620 (' <a href="../../../../%s/%s/%s/">%s</a>' % \ 621 (related.opts.app_label, related.opts.module_name, sub_obj.id, strip_tags(str(sub_obj)))), []])621 (related.opts.app_label, related.opts.module_name, getattr(sub_obj, '%s' % sub_obj._meta.pk.attname), strip_tags(str(sub_obj)))), []]) 622 622 # If there were related objects, and the user doesn't have 623 623 # permission to change them, add the missing perm to perms_needed. 624 624 if related.opts.admin and has_related_objs: