I have a problem with the sql being generated by this: tasks = Task.objects.filter(status='open').order_by('-priority') tasks = tasks.extra(where=['list IN %s'], params= [settings.MY_LISTS])
Is there a command where I can say something like 'print tasks.sql' that would generate the sql but not send it to the database, so I can see exactly why the sql is failing? The error comes back ...for the right syntax to use near ''(\\'PHB\\',\\'HEADP\\',\\'FUGS\ \')' ORDER BY `tasks`.`priority` DESC' at line 1") but doesn't show me the whole query and not sure if the \\ are in the sql or are part of the debug output or if this is the error, but if I could see the whole sql I would know what the problem was. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---