Ticket #1678: django_1678.diff

File django_1678.diff, 1.4 KB (added by Christopher Lenz <cmlenz@…>, 19 years ago)

Use verbose_name instead of name

  • django/contrib/admin/views/main.py

     
    468468                # Don't display link to edit, because it either has no
    469469                # admin or is edited inline.
    470470                nh(deleted_objects, current_depth, [_('One or more %(fieldname)s in %(name)s: %(obj)s') % \
    471                     {'fieldname': related.field.name, 'name': related.opts.verbose_name, 'obj': escape(str(sub_obj))}, []])
     471                    {'fieldname': related.field.verbose_name, 'name': related.opts.verbose_name, 'obj': escape(str(sub_obj))}, []])
    472472            else:
    473473                # Display a link to the admin page.
    474474                nh(deleted_objects, current_depth, [
    475                     (_('One or more %(fieldname)s in %(name)s:') % {'fieldname': related.field.name, 'name':related.opts.verbose_name}) + \
     475                    (_('One or more %(fieldname)s in %(name)s:') % {'fieldname': related.field.verbose_name, 'name':related.opts.verbose_name}) + \
    476476                    (' <a href="../../../../%s/%s/%s/">%s</a>' % \
    477477                        (related.opts.app_label, related.opts.module_name, sub_obj._get_pk_val(), escape(str(sub_obj)))), []])
    478478        # If there were related objects, and the user doesn't have
Back to Top