556 | | defaults = {'queryset': self.rel.to._default_manager.all(), 'required': not self.blank, 'label': capfirst(self.verbose_name), 'help_text': self.help_text} |
| 556 | defaults = {'required': not self.blank, 'label': capfirst(self.verbose_name), 'help_text': self.help_text} |
| 557 | if hasattr(self.rel.limit_choices_to, 'get_sql'): |
| 558 | defaults['queryset']=self.rel.to._default_manager.filter(self.rel.limit_choices_to) |
| 559 | else: |
| 560 | defaults['queryset']=self.rel.to._default_manager.filter(**self.rel.limit_choices_to) |