Browse files

Fixed #12477 - Fields specified in ModelAdmin.readonly_fields now res…

…pect Field.verbose_name.

git-svn-id: http://code.djangoproject.com/svn/django/trunk@12053 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent dab8743 commit 8465f49b63b1b85603e16671e9fbe41a28971560 @jezdez jezdez committed Jan 1, 2010
Showing with 1 addition and 2 deletions.
  1. +1 −2 django/contrib/admin/util.py
View
3 django/contrib/admin/util.py
@@ -252,8 +252,7 @@ def lookup_field(name, obj, model_admin=None):
def label_for_field(name, model, model_admin):
try:
- model._meta.get_field_by_name(name)[0]
- return name
+ return model._meta.get_field_by_name(name)[0].verbose_name
except models.FieldDoesNotExist:
if name == "__unicode__":
return force_unicode(model._meta.verbose_name)

0 comments on commit 8465f49

Please sign in to comment.