Re: Ticket 28087: Allow filtering and ordering with RawQuerySet

2017-04-21 Thread Dmitriy Sintsov
There is also ListQuerySet https://django-jinja-knockout.readthedocs.io/en/latest/quickstart.html#listqueryset to be used with Prefetch() results but it's probably is too specific one. I use it in private project. On Friday, April 21, 2017 at 10:44:54 PM UTC+3, Ian Foote wrote: > > Hi Dmitriv,

Re: Ticket 28087: Allow filtering and ordering with RawQuerySet

2017-04-21 Thread Dmitriy Sintsov
On Friday, April 21, 2017 at 10:44:54 PM UTC+3, Ian Foote wrote: > > Hi Dmitriv, > > I think you're running into https://code.djangoproject.com/ticket/27332. > Unfortunately this isn't fixed yet, but there's a pull request, so it > might land in 2.0: https://github.com/django/django/pull/7560

Re: Ticket 28087: Allow filtering and ordering with RawQuerySet

2017-04-21 Thread Dmitriy Sintsov
On Friday, April 21, 2017 at 10:30:49 PM UTC+3, Adam Johnson wrote: > > This isn't the place for a tutorial on how joins work in the Django ORM, > there is plenty of documentation, tutorials, blog posts, and stack overflow > posts for that. Check it out by internet-searching "Django select_rela

Re: Ticket 28087: Allow filtering and ordering with RawQuerySet

2017-04-21 Thread Ian Foote
Hi Dmitriv, I think you're running into https://code.djangoproject.com/ticket/27332. Unfortunately this isn't fixed yet, but there's a pull request, so it might land in 2.0: https://github.com/django/django/pull/7560 Ian On 21/04/17 19:41, Dmitriy Sintsov wrote: > If I understand correctly, LEFT

Re: Ticket 28087: Allow filtering and ordering with RawQuerySet

2017-04-21 Thread Adam Johnson
This isn't the place for a tutorial on how joins work in the Django ORM, there is plenty of documentation, tutorials, blog posts, and stack overflow posts for that. Check it out by internet-searching "Django select_related" or "django join". Any combination of inner and left joins is possible with

Re: Ticket 28087: Allow filtering and ordering with RawQuerySet

2017-04-21 Thread Dmitriy Sintsov
If I understand correctly, LEFT JOIN is automatically chosen when ForeignKey(null=True) otherwise it will be INNER JOIN? My ProfileRequisites.profile ForeignKey is not nullable yet I need to use LEFT JOIN in this query so I have profiles and ProfileRequisites in the same list. Profiles are alwa

Re: Ticket 28087: Allow filtering and ordering with RawQuerySet

2017-04-21 Thread Adam Johnson
It depends upon whether the foreignkey/onetoonefield is nullable. On 21 April 2017 at 17:16, Dmitriy Sintsov wrote: > How can I chose whether select_related() will use LEFT JOIN or INNER JOIN? > There are two joins, one is LEFT another is INNER one. > > On Friday, April 21, 2017 at 1:40:47 PM UT

Re: Ticket 28087: Allow filtering and ordering with RawQuerySet

2017-04-21 Thread Dmitriy Sintsov
How can I chose whether select_related() will use LEFT JOIN or INNER JOIN? There are two joins, one is LEFT another is INNER one. On Friday, April 21, 2017 at 1:40:47 PM UTC+3, Adam Johnson wrote: > > Joining two tables like that on one-to-one relations can be easily > achieved with select_relat

Re: Ticket 28087: Allow filtering and ordering with RawQuerySet

2017-04-21 Thread Adam Johnson
Joining two tables like that on one-to-one relations can be easily achieved with select_related . On 21 April 2017 at 09:47, Dmitriy Sintsov wrote: > I know that it does not work in the general case, but still having >

Re: Ticket 28087: Allow filtering and ordering with RawQuerySet

2017-04-21 Thread Dmitriy Sintsov
I know that it does not work in the general case, but still having orthogonal processing of RAW queries with the same filter() / order_by() calls matches Django's DRY philosophy. Raw queries which has hardcoded WHERE and ORDER BY statements will simply raise an error when another WHERE / ORDER B

Re: A New Design for the "Congratulations!" Page

2017-04-21 Thread Federico Capoano
That's a great news, let us know if we can help with more feedback. Federico On Fri, Apr 21, 2017 at 9:20 AM Aymeric Augustin < aymeric.augus...@polytechnique.org> wrote: > On 18 Apr 2017, at 20:31, Tim Allen wrote: > > Your point on design by committee is spot-on; I think that's the direction

Re: A New Design for the "Congratulations!" Page

2017-04-21 Thread Aymeric Augustin
On 18 Apr 2017, at 20:31, Tim Allen wrote: > Your point on design by committee is spot-on; I think that's the direction > we'll head in. Hello, For the sake of transparency, a group of five people (Tim, Chad, Collin Anderson, Frank Wiles, and myself) is now working on polishing the proposal.