Ticket #7957: django_extra.diff
File django_extra.diff, 1.3 KB (added by , 16 years ago) |
---|
-
db/models/sql/query.py
1529 1529 if select: 1530 1530 # The extra select might be ordered (because it will be accepting 1531 1531 # parameters). 1532 if (isinstance(select, SortedDict) and 1533 not isinstance(self.extra_select, SortedDict)): 1532 if not isinstance(self.extra_select, SortedDict): 1534 1533 self.extra_select = SortedDict(self.extra_select) 1535 self.extra_select. update(select)1534 self.extra_select.append(SortedDict(select)) 1536 1535 if select_params: 1537 1536 self.extra_select_params += tuple(select_params) 1538 1537 if where: -
utils/datastructures.py
121 121 def update(self, dict_): 122 122 for k, v in dict_.items(): 123 123 self.__setitem__(k, v) 124 125 def append(self, data): 126 for key, value in data.iteritems(): 127 super(SortedDict, self).__setitem__(key, value) 128 self.keyOrder.append(key) 124 129 125 130 def setdefault(self, key, default): 126 131 if key not in self.keyOrder: