Re: Stop QuerySet repr from executing queries

2019-10-15 Thread 'Alexandr Aktsipetrov' via Django developers (Contributions to Django itself)
Current behavior is indeed usually useful but I actually remember being annoyed by it during interactive debugging - as watches affect sql log. What about reusing DEBUG instead of introducing brand new setting? I imagine all tutorials are in the context of scaffolded project with DEBUG=True a

Re: Desired behaviour when passing a non boolean to filter(*__isnull)

2019-10-03 Thread 'Alexandr Aktsipetrov' via Django developers (Contributions to Django itself)
On Monday, September 30, 2019 at 5:47:12 PM UTC+3, André Ericson wrote: > > Hello, > > I came across the discovery (due to a bug on our code) that it's possible > to pass a non-boolean to the __isnull filter. What would be the desired > behavior here? > Should we raise an exception or should Dja

Re: Discussing potential QuerySet.subquery interface

2019-08-20 Thread 'Alexandr Aktsipetrov' via Django developers (Contributions to Django itself)
Hello Simon, thanks for the links. I would assume a .subquery() that isn't preceded by a .values() would > result in a SELECT * FROM (...)? > Maybe from implementation perspective it would be easier to copy all fields explicitly. -- You received this message because you are subscribed to the G

Discussing potential QuerySet.subquery interface

2019-08-20 Thread 'Alexandr Aktsipetrov' via Django developers (Contributions to Django itself)
Hi, I've been thinking what is the best way to address #28333 - it is desirable to be able to filter by Window expression in ORM. But that requires using subqueries in sql. The ticket itself proposes doing so implicitly and keeping the usual filter int