All your suggestions implemented, except moving the order_by out of the prejoin. (If nothing else, I like to avoid any risk of triggering query-before-slice bugs a priori). I didn't know tuple comprehensions were in python 2.5; I thought they were 2.6-only and so didn't use them.
You're also right that I shouldn't have said "Project" for "Product" in model code. It was reckless of me, and it is now undone.
Thanks. Wow, you did some careful research!
All your suggestions implemented, except moving the order_by out of the prejoin. (If nothing else, I like to avoid any risk of triggering query-before-slice bugs a priori). I didn't know tuple comprehensions were in python 2.5; I thought they were 2.6-only and so didn't use them.
You're also right that I shouldn't have said "Project" for "Product" in model code. It was reckless of me, and it is now undone.