Re: django queryset/annotate get extra column

2016-05-20 Thread stunaz
Wonderfull (ps :sorry, I should have put the model) On Friday, May 20, 2016 at 2:40:33 AM UTC-4, James Schneider wrote: > > On Wed, May 18, 2016 at 9:54 PM, stunaz > wrote: > >> Hi, >> I would like to write the following query using django orm. >> >> select * , >> (select

Re: django queryset/annotate get extra column

2016-05-20 Thread James Schneider
On Wed, May 18, 2016 at 9:54 PM, stunaz wrote: > Hi, > I would like to write the following query using django orm. > > select * , > (select image_url from blog_image bi where bi.blog_id = b.id and bi. > principal=1) as blog_main_imange > from blog b > > > Any idea, how to write

django queryset/annotate get extra column

2016-05-18 Thread stunaz
Hi, I would like to write the following query using django orm. select * , (select image_url from blog_image bi where bi.blog_id = b.id and bi. principal=1) as blog_main_imange from blog b Any idea, how to write the queryset ? -- You received this message because you are subscribed to the