1
は、ここで私はちょうど1つのクエリでこれらの2つのクエリを組み合わせることができますどのようにジャンゴ:複数のクエリを注釈
data1 = Data.objects.filter(...).annotate(Max('receiver')).order_by('-receiver__max')
data2 = Data.objects.filter(...).annotate(Max('sender')).order_by('-sender__max')
、私のコードですか?
正常に動作します。ありがとうございます! –