Could you try adding a failing test case to Django's test suite based on 
your code in tests/expressions?

On Wednesday, August 12, 2015 at 5:47:53 PM UTC-4, yong...@bloomsky.com 
wrote:
>
> 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/5f21fa37-240b-4ade-922f-6c2f831c8f00%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to