1. Luke Plant
  2. django

Commits

jkoc...@bcc190cf-cafb-0310-a4f2-bffc1f526a37  committed 0cde165

magic-removal: verbose_name for OneToOneField is now calculated like for ForeignKey rather than set to 'ID'

  • Participants
  • Parent commits 1e9d30e
  • Branches magic-removal

Comments (0)

Files changed (1)

File django/db/models/fields/related.py

View file
  • Ignore whitespace
 
 class OneToOneField(RelatedField, IntegerField):
     def __init__(self, to, to_field=None, **kwargs):
-        kwargs['verbose_name'] = kwargs.get('verbose_name', 'ID')
+        kwargs['verbose_name'] = kwargs.get('verbose_name', '')
         to_field = to_field or to._meta.pk.name
 
         if kwargs.has_key('edit_inline_type'):