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

2019-04-14 Thread Илья
>From my subjective point of view `one` is more short and concise, but your points are valid too, so something like `qs.first(ordered=False)` seems to be a reasonable tradeoff. I'd say that its arg should be keyword only to be explicit. And this arg doesn't then need to be added to `last`. вс, 1

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

2019-04-14 Thread Илья
First/last enforces ordering because of its nature and also we can't break compatibility. And second factor is that qs[0] as I wrote above can raise exception and also will still have ordering (from model.meta for example). вс, 14 апр. 2019 г., 0:04 Florian Apolloner : > On Saturday, April 13, 20

Django and South

2012-11-20 Thread Лебедев Илья
I've realized that django has no migration tool in development and that looks weird for me. Everybody use South, but django neither includes it in contrib nor uses it in development. What's the big deal? Can someone please explain. -- You received this message because you are subscribed to the Go

django.contrib.redirects customisation

2012-11-16 Thread Лебедев Илья
Recently I needed functionality just like in django.contrib.redirects - redirects table, that can be edited in admin. I was sad to find out that its strongly not configurable. For example, I dont need status 301, but need something else. I dont need 'site' field (since there is only one site), but