Ticket #13730: soft_db_index.diff
File soft_db_index.diff, 887 bytes (added by , 14 years ago) |
---|
-
django/db/models/fields/related.py
812 812 to_field = to_field or (to._meta.pk and to._meta.pk.name) 813 813 kwargs['verbose_name'] = kwargs.get('verbose_name', None) 814 814 815 if 'db_index' not in kwargs: 816 kwargs['db_index'] = True 815 817 kwargs['rel'] = rel_class(to, to_field, 816 818 related_name=kwargs.pop('related_name', None), 817 819 limit_choices_to=kwargs.pop('limit_choices_to', None), … … 819 821 parent_link=kwargs.pop('parent_link', False)) 820 822 Field.__init__(self, **kwargs) 821 823 822 self.db_index = True823 824 824 def validate(self, value, model_instance): 825 825 if self.rel.parent_link: 826 826 return