mirror of https://github.com/django/django.git
Fixed #3581, a small typo in OneToOneField.formfield(). Thanks, Andrew Sutherland.
git-svn-id: http://code.djangoproject.com/svn/django/trunk@4611 bcc190cf-cafb-0310-a4f2-bffc1f526a37
This commit is contained in:
parent
51f39d59bd
commit
9da791aa6b
|
@ -621,7 +621,7 @@ class OneToOneField(RelatedField, IntegerField):
|
||||||
def formfield(self, **kwargs):
|
def formfield(self, **kwargs):
|
||||||
defaults = {'queryset': self.rel.to._default_manager.all(), 'required': not self.blank, 'label': capfirst(self.verbose_name), 'help_text': self.help_text}
|
defaults = {'queryset': self.rel.to._default_manager.all(), 'required': not self.blank, 'label': capfirst(self.verbose_name), 'help_text': self.help_text}
|
||||||
defaults.update(kwargs)
|
defaults.update(kwargs)
|
||||||
return forms.ModelChoiceField(**kwargs)
|
return forms.ModelChoiceField(**defaults)
|
||||||
|
|
||||||
class ManyToManyField(RelatedField, Field):
|
class ManyToManyField(RelatedField, Field):
|
||||||
def __init__(self, to, **kwargs):
|
def __init__(self, to, **kwargs):
|
||||||
|
|
Loading…
Reference in New Issue