Ticket #13963: admin-relatedobject.patch
File admin-relatedobject.patch, 657 bytes (added by , 14 years ago) |
---|
-
django/contrib/admin/util.py
old new def lookup_field(name, obj, model_admin= 279 279 def label_for_field(name, model, model_admin=None, return_attr=False): 280 280 attr = None 281 281 try: 282 label = model._meta.get_field_by_name(name)[0].verbose_name 282 field = model._meta.get_field_by_name(name)[0] 283 try: 284 label = field.verbose_name 285 except AttributeError: 286 label = field.var_name 283 287 except models.FieldDoesNotExist: 284 288 if name == "__unicode__": 285 289 label = force_unicode(model._meta.verbose_name)