class documentation

class RelatedPopulator:

View In Hierarchy

RelatedPopulator is used for select_related() object instantiation.

The idea is that each select_related() model will be populated by a different RelatedPopulator instance. The RelatedPopulator instances get klass_info and select (computed in SQLCompiler) plus the used db as input for initialization. That data is used to compute which columns to use, how to instantiate the model, and how to populate the links between the objects.

The actual creation of the objects is done in populate() method. This method gets row and from_obj as input and populates the select_related() model instance.

Method __init__ Undocumented
Method populate Undocumented
Instance Variable cols​_end Undocumented
Instance Variable cols​_start Undocumented
Instance Variable db Undocumented
Instance Variable init​_list Undocumented
Instance Variable local​_setter Undocumented
Instance Variable model​_cls Undocumented
Instance Variable pk​_idx Undocumented
Instance Variable related​_populators Undocumented
Instance Variable remote​_setter Undocumented
Instance Variable reorder​_for​_init Undocumented
def __init__(self, klass_info, select, db):

Undocumented

def populate(self, row, from_obj):

Undocumented

cols_end =

Undocumented

cols_start =

Undocumented

db =

Undocumented

init_list =

Undocumented

local_setter =

Undocumented

model_cls =

Undocumented

pk_idx =

Undocumented

related_populators =

Undocumented

remote_setter =

Undocumented

reorder_for_init =

Undocumented