mirror of
https://github.com/django/django.git
synced 2025-07-04 17:59:13 +00:00
magic-removal: verbose_name for OneToOneField is now calculated like for ForeignKey rather than set to 'ID'
git-svn-id: http://code.djangoproject.com/svn/django/branches/magic-removal@2801 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
3b0e5d8d29
commit
eeac3a174f
@ -506,7 +506,7 @@ class ForeignKey(RelatedField, Field):
|
|||||||
|
|
||||||
class OneToOneField(RelatedField, IntegerField):
|
class OneToOneField(RelatedField, IntegerField):
|
||||||
def __init__(self, to, to_field=None, **kwargs):
|
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
|
to_field = to_field or to._meta.pk.name
|
||||||
|
|
||||||
if kwargs.has_key('edit_inline_type'):
|
if kwargs.has_key('edit_inline_type'):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user