class Модель_1(models.Model): поле = models.IntegerField() class Модель_2(models.Model): модель_1 = models.ForeignKey(Модель_1, related_name="модели_1") модели_1 = Модель_1.objects.filter(поле="значение") 

Here I chose the model, or part of the models.

How now separately, in one request - it is important exactly in one request and without using prefetch_related, to select all Models2 that are associated with already selected Models1?

Just have an idea to try to use values ​​(), for sampling. And there you can not load the related tables immediately.

    1 answer 1

     ids = модели_1.values_list('id', flat=True) #или, если queryset уже выбран из базы ids = [o.id for o in модели_1] Модель_2.objects.filter(модель_1_id__in=ids)