I want to have a model with calculated fields that I can apply sorting on. For example, let\'s say that I have the following model:
class Foo(models.Model):
I would take a look at the extra method on Queryset and specify the order_by parameter.