#23460: Allow a literal `%s` to be passed through extra select -------------------------------------+------------------------------------- Reporter: mattrobenolt | Owner: nobody Type: Uncategorized | Status: new Component: Database layer | Version: 1.7 (models, ORM) | Resolution: Severity: Normal | Triage Stage: Keywords: queryset | Unreviewed Has patch: 1 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Changes (by mattrobenolt):
* needs_docs: => 0 * needs_tests: => 0 * needs_better_patch: => 0 Old 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. New description: Right now, if you try and do something like this: {{{ Foo.objects.extra(select={'foo': "'%%s"'}) }}} or {{{ Foo.objects.extra(select={'foo': '"%s"'}) See: https://github.com/django/django/pull/3209 for patch. }}} it blows up because it tries to convert the %s into a parameter It's expected to allow %%s as an escape sequence. -- -- Ticket URL: <https://code.djangoproject.com/ticket/23460#comment:1> Django <https://code.djangoproject.com/> The Web framework for perfectionists with deadlines. -- You received this message because you are subscribed to the Google Groups "Django updates" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/070.fe4c79ad9c90ab909c04cab79972cc80%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.