human
how to sort by a computed value in django
assistant
Here is some code to sort objects in model `Profile` based on Theirs `reputation` attribute

sorted(Profile.objects.all(), key=lambda p: p.reputation)

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.