Re: Automatically get default value for "current_app", for easier namespace support.

2015-10-25 Thread George Ma
That's exactly what I'm thinking about. Unfortunately, it's not brought to the attention among Django developers so far. On Tuesday, 20 May 2014 02:01:55 UTC-6, Tai Lee wrote: > > Right now it seems that for a generic app to support the possibility of > being installed in a URLconf with a namesp

Re: Please add exists subquery to queryset api

2014-11-11 Thread George Ma
(SELECT 1 FROM myapp_b T1 WHERE > T1.a_id = myapp_a.id AND T1.criteria = True) > > perhaps? > > > On 11 November 2014 16:18, George Ma > > wrote: > >> Yes, the actual sql is very close to this one. But I just feel this >> approach is like a hack. Because I al

Re: Please add exists subquery to queryset api

2014-11-10 Thread George Ma
o know the SQL generated for any particular queryset, you can > just: > > print str(qs.query) > > On 11 November 2014 11:39, George Ma > > wrote: > >> For simplicity, let's assume we have a model A and model B. >> >> class A(models.Model): >>

Re: Please add exists subquery to queryset api

2014-11-10 Thread George Ma
h this approach is that: first I don't know how the performance would be; second, it's not very natural from sql query's perspective. On Sunday, November 9, 2014 1:01:42 AM UTC-7, Shai Berger wrote: > > Hello George, > > On Sunday 09 November 2014 05:33:36 George Ma wr

Please add exists subquery to queryset api

2014-11-08 Thread George Ma
I've encountered quite a few cases where I need to write complicated queries where a exists subquery makes more sense and has better performance. So far, there's no exists subquey support in queryset api. Please add it. -- You received this message because you are subscribed to the Google Grou