What is the purpose of adding `nowrap` class to all ForeignKey fields in django admin objects list?

2015-12-07 Thread alTus
Django adds `nowrap` class to your `td` if you specify list_display to show any ForeignKey. I can't see the purpose to do it. Any considerably long title breaks table layout hard. Do I miss smth or may be it would be better to just remove it? -- You received this message because you are subscri

Re: What is the purpose of adding `nowrap` class to all ForeignKey fields in django admin objects list?

2015-12-07 Thread alTus
u're > looking for. > > On Monday, December 7, 2015 at 8:33:34 AM UTC-5, alTus wrote: >> >> Django adds `nowrap` class to your `td` if you specify list_display to >> show any ForeignKey. >> I can't see the purpose to do it. Any considerably long title

Django explicit `order_by` by ForeignKey field

2014-04-28 Thread alTus
I've already started this topic in django-users ( https://groups.google.com/forum/#!topic/django-users/k9K7VsPe6aA) and got an advice there to ask here. It's not a big issue and it can be solved quite easily as I can see from django sources. Also there're some workarounds to deal with it but I wr

Re: Django explicit `order_by` by ForeignKey field

2014-04-28 Thread alTus
it correctly. > > I attached a patch to the ticket that makes sure that explicitly ordering > by a relation source field (group_id in your case) produces the expected > result. > > Simon > > Le lundi 28 avril 2014 07:53:02 UTC-4, alTus a écrit : >> >> I&#

Re: Master/slave trolling pull request accepted to django master branch

2014-05-27 Thread alTus
It took 7 minutes and 23 seconds to merge this troll PR without any discussion and now Meira is suggested to wait 6 months? But what can happen? вторник, 27 мая 2014 г., 16:14:43 UTC+4 пользователь Meira написал: > > As some of you may have notice, a hot discussion is happening in the > comments

Add to QuerySet method `one` that acts as `first` but without ordering

2019-04-13 Thread alTus
Hello. Please consider if that proposal can be useful not only for me :) `QuerySet.first` is quite useful shortcut but its drawback is that it involves ordering so some DB queries become expensive. But quite often (and very often while debugging) there's a need just to get one object that satis

Re: Add to QuerySet method `one` that acts as `first` but without ordering

2019-04-13 Thread alTus
No, because qs[0] will raise exception if nothing found (and still it will have ordering). суббота, 13 апреля 2019 г., 21:24:30 UTC+3 пользователь Adam Johnson написал: > > Doesn’t it work to do qs[0] ? > > On Sat, 13 Apr 2019 at 17:48, alTus > > wrote: > >> Hell

Re: Add to QuerySet method `one` that acts as `first` but without ordering

2019-04-13 Thread alTus
you want and is not worth adding > .one() > > Cheers, > Florian > > On Saturday, April 13, 2019 at 5:48:29 PM UTC+2, alTus wrote: >> >> Hello. >> >> Please consider if that proposal can be useful not only for me :) >> >> `QuerySet.first` is quit

Re: Add to QuerySet method `one` that acts as `first` but without ordering

2019-04-14 Thread alTus
Hi. Thank you for that detail response. It needs to be clarified that I'm not that worried about exception as it could seem :) It was just an answer to those 2 comments to show that their workarounds result in different behaviour than proposed `one`. `get_or_none` would be useful in my opinion