Ticket #2520: django_admin_change_list_order_bug.diff
File django_admin_change_list_order_bug.diff, 681 bytes (added by , 18 years ago) |
---|
-
django/contrib/admin/views/main.py
715 715 for bit in self.query.split(): 716 716 or_queries = [models.Q(**{'%s__icontains' % field_name: bit}) for field_name in self.lookup_opts.admin.search_fields] 717 717 other_qs = QuerySet(self.model) 718 if qs._select_related: 719 other_qs = other_qs.select_related() 718 720 other_qs = other_qs.filter(reduce(operator.or_, or_queries)) 719 721 qs = qs & other_qs 720 722