Lines Matching refs:related_model
330 def determine_relationship(self, related_model): argument
341 for field in related_model._meta.fields:
346 for field in related_model._meta.many_to_many:
352 if self._is_relation_to(field, related_model):
356 (related_model, self.model))
359 def _get_pivot_iterator(self, base_objects_by_id, related_model): argument
370 relationship_type, field = self.determine_relationship(related_model)
373 related_model, field)
376 base_objects_by_id, related_model, field.m2m_db_table(),
381 base_objects_by_id, related_model, field.m2m_db_table(),
385 def _many_to_one_pivot(self, base_objects_by_id, related_model, argument
392 for related_object in related_model.objects.filter(**filter_data):
403 pivot_from_field, pivot_to_field, related_model): argument
429 cursor = connections[related_model.objects.db].cursor()
434 def _many_to_many_pivot(self, base_objects_by_id, related_model, argument
444 related_model)
448 related_objects_by_id = related_model.objects.in_bulk(all_related_ids)
454 def populate_relationships(self, base_objects, related_model, argument
473 related_model)