Hey I want to sort objects based on a computed value in django... how do I do it?
Here is an example User profile model based on stack overflow that explains my pred
Since your calculation code exists only within Python, you have to perform the sorting in Python as well:
sorted (Profile.objects.all (), key = lambda p: p.reputation)