diff -uprN django.orig/db/models/sql/query.py django/db/models/sql/query.py
old
|
new
|
class BaseQuery(object):
|
2177 | 2177 | entry_params = [] |
2178 | 2178 | pos = entry.find("%s") |
2179 | 2179 | while pos != -1: |
2180 | | entry_params.append(param_iter.next()) |
| 2180 | # allow %s to be sent to the database, example calling strftime |
| 2181 | # from sqlite |
| 2182 | if entry.find("%%s", pos-1) != pos-1: |
| 2183 | entry_params.append(param_iter.next()) |
2181 | 2184 | pos = entry.find("%s", pos + 2) |
2182 | 2185 | select_pairs[name] = (entry, entry_params) |
2183 | 2186 | # This is order preserving, since self.extra_select is a SortedDict. |