Opened 10 years ago
Last modified 10 years ago
#23460 closed Bug
Allow a literal `%s` to be passed through extra select — at Initial Version
Reported by: | Matt Robenolt | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | 1.7 |
Severity: | Normal | Keywords: | queryset |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Right now, if you try and do something like this:
Foo.objects.extra(select={'foo': "'%%s"'})
or
Foo.objects.extra(select={'foo': '"%s"'})
it blows up because it tries to convert the %s into a parameter
It's expected to allow %%s as an escape sequence.
Note:
See TracTickets
for help on using tickets.