私はこれをやっています:
p = MyModel.objects.filter(user__username="me").annotate(friend_count=Count(friends))
私が見るとき:
p[0]._meta.get_all_field_names()
モデルで定義されているすべてのものを返しますが、注釈付きフィールド'friend_count'は返しません。
特定のモデルインスタンスのすべての注釈付きフィールドを表示するために使用できる関数はありますか?