I'm using the new RawSQL class with annotate suggested by the django documentation. I noticed the second parameter the constructor takes is a tuple. When I used it in my project, however, I got a 'tuple object does not have attribute 'extend'' error. I looked at the trace back and source code, and found that django is calling 'extend()' on that parameter, which should not happen if the parameter is expected to be a tuple. I don't know if anyone has seen the same thing here. If I'm making a mistake, I'd like to know the correct use of RawSQL. Thanks a lot.
The example given in the django doc is: qs.annotate(val=RawSQL("select col from sometable where othercol = %s", (someparam,))) But this usage gives me an error stated above. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/eb1332e0-55d6-434d-b59c-c65a18cddb7b%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.