Specifying order_by on Related Field in Django
问题 In Django, on a given model it looks like the RelatedManager may only be set statically (see: docs) but is there any way to set the order_by on the related manager for a given Queryset? I tried using prefetch_related and Prefetch , but that does not seem to work: qs = qs.prefetch_related( Prefetch('item_set', queryset=Item.objects.order_by('capture_dt').all())) res = qs.first().item_set.all().ordered In this case res is False . The problem comes when I try to access the related manager: