Hi, Is it possible to order a queryset by a calculated field, such as multiplication of 2 attributes?
With the fantastic aggregate functions introduced, I think something like this would be cool: Book.objects.annotate(total=Arithmetic('price * tax')).order_by ('total') Thanks, oMat --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---