I have used this in a raw query. But it depends on the DB backend of Django. If I'm remembering correctly, it worked with PostgreSQL/psycopg2, but not with SQLite/whatever_back_end when I was using it.
Bill On Sun, Dec 25, 2011 at 3:58 AM, ali alizadeh <ali.alizade...@gmail.com> wrote: > hi. > > in psycopg module, when composing a query, you can use "%(key)s" in your > query instead of "%s", and pass a dictionary instead of a list for actual > parameter. > django docs mention the "%s" syntax for raw queries. i was just wondering if > the other syntax is supported or not, because it can be handy sometimes. > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To post to this group, send email to django-users@googlegroups.com. > To unsubscribe from this group, send email to > django-users+unsubscr...@googlegroups.com. > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.