Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 8465f49b63b1b85603e16671e9fbe41a28971560 1 parent dab8743
@jezdez jezdez authored
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)
Please sign in to comment.
Something went wrong with that request. Please try again.