Ticket #12477: diff.diff

File diff.diff, 570 bytes (added by Alex Gaynor, 15 years ago)
  • django/contrib/admin/util.py

    diff --git a/django/contrib/admin/util.py b/django/contrib/admin/util.py
    index 8b2435e..4a9f49c 100644
    a b def lookup_field(name, obj, model_admin=None):  
    252252
    253253def label_for_field(name, model, model_admin):
    254254    try:
    255         model._meta.get_field_by_name(name)[0]
    256         return name
     255        return model._meta.get_field_by_name(name)[0].verbose_name
    257256    except models.FieldDoesNotExist:
    258257        if name == "__unicode__":
    259258            return force_unicode(model._meta.verbose_name)
Back to Top