Ticket #3581: related-onetoone-kwargs-to-defaults.patch
File related-onetoone-kwargs-to-defaults.patch, 658 bytes (added by , 18 years ago) |
---|
-
django/db/models/fields/related.py
621 621 def formfield(self, **kwargs): 622 622 defaults = {'queryset': self.rel.to._default_manager.all(), 'required': not self.blank, 'label': capfirst(self.verbose_name), 'help_text': self.help_text} 623 623 defaults.update(kwargs) 624 return forms.ModelChoiceField(** kwargs)624 return forms.ModelChoiceField(**defaults) 625 625 626 626 class ManyToManyField(RelatedField, Field): 627 627 def __init__(self, to, **kwargs):