Ticket #11946: 11946.remove_lookup_overrides.diff
File 11946.remove_lookup_overrides.diff, 1.8 KB (added by , 15 years ago) |
---|
-
django/db/models/fields/related.py
628 628 629 629 class ManyToOneRel(object): 630 630 def __init__(self, to, field_name, related_name=None, 631 limit_choices_to=None, lookup_overrides=None,parent_link=False):631 limit_choices_to=None, parent_link=False): 632 632 try: 633 633 to._meta 634 634 except AttributeError: # to._meta doesn't exist, so it must be RECURSIVE_RELATIONSHIP_CONSTANT … … 638 638 if limit_choices_to is None: 639 639 limit_choices_to = {} 640 640 self.limit_choices_to = limit_choices_to 641 self.lookup_overrides = lookup_overrides or {}642 641 self.multiple = True 643 642 self.parent_link = parent_link 644 643 … … 655 654 656 655 class OneToOneRel(ManyToOneRel): 657 656 def __init__(self, to, field_name, related_name=None, 658 limit_choices_to=None, lookup_overrides=None,parent_link=False):657 limit_choices_to=None, parent_link=False): 659 658 super(OneToOneRel, self).__init__(to, field_name, 660 659 related_name=related_name, limit_choices_to=limit_choices_to, 661 lookup_overrides=lookup_overrides,parent_link=parent_link)660 parent_link=parent_link) 662 661 self.multiple = False 663 662 664 663 class ManyToManyRel(object): … … 696 695 kwargs['rel'] = rel_class(to, to_field, 697 696 related_name=kwargs.pop('related_name', None), 698 697 limit_choices_to=kwargs.pop('limit_choices_to', None), 699 lookup_overrides=kwargs.pop('lookup_overrides', None),700 698 parent_link=kwargs.pop('parent_link', False)) 701 699 Field.__init__(self, **kwargs) 702 700