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.