4 ms·
Thanks for the links. 1.order_by fixing: I always run into problems with it, this is much needed 2.model inheritance: finally! 3.querysets not loaded into me
by mrtron 19y ago
Thanks for the links.
1.order_by fixing: I always run into problems with it, this is much needed
2.model inheritance: finally!
3.querysets not loaded into memory: yay! I do some hackery around the old way that I can remove.
4.slicing to the end: nice, again this commonly results in a big of uglyness getting the total size of the queryset
5.reverse? nice feature to have. So if you order by date you can quickly reverse the order.
6.values retrieving through FK? Amazingly useful. If you don't already use values, I strongly suggest looking into it. For large sets of data it is a must-have feature, you can load a minimal amount of data. I do this for things like mapping a number of points, I just grab the id and lat/long. However, now I can simplify that function since I can grab values across FK's.
7.Values list? Actually somewhat handy, depending on the application. Dictionary is nice for my previous example of using values.
8.Restrictive select related? Very cool, you can do some optimization by providing a list of what you actually want to get.
9.None check? Perfect, I much prefer that syntax to the blah__isnull=True.
10. Update for a queryset? Very nice - will consider how to use this to optimize some work. So instead of saving individual objects you could do one big update.
11. Q class improvements? I currently don't use Q's, but with this added functionality I may revisit that.
Overall this looks great. Many positive improvements, and a very logical upgrade to Trunk. I imagine once the newforms admin makes use of this and integrates the model inheritance it will also be merged in.