Proxy of the Relation that is a list with special methods.
On first access calculates the name of the related field, later stored in _related_field_name property.
name of the related field :rtype: str
Since some QuerySetProxy methods overwrite builtin list methods we catch calls to them and delegate it to QuerySetProxy instead.
item: name of attribute :type item: str
value of attribute :rtype: Any
Delegates calls for non existing attributes to QuerySetProxy.
item: name of attribute/method :type item: str
method from QuerySetProxy if exists :rtype: method
Initializes the QuerySetProxy if not yet initialized.
Checks if the QuerySetProxy is already set and ready.
result of the check :rtype: bool
Verifies if the parent model of the relation has been already saved. Otherwise QuerySetProxy cannot filter by parent primary key.
Creates new QuerySet with relation model and pre filters it with currents parent model primary key, so all queries by definition are already related to the parent model only, without need for user to filter them.
initialized QuerySet :rtype: QuerySet
Removes the related from relation with parent.
Through models are automatically deleted for m2m relations.
For reverse FK relations keep_reversed flag marks if the reversed models should be kept or deleted from the database too (False means that models will be deleted, and not only removed from relation).
item: child to remove from relation :type item: Model
keep_reversed: flag if the reversed model should be kept or deleted too :type keep_reversed: bool
Adds child model to relation.
For ManyToMany relations through instance is automatically created.
kwargs: dict of additional keyword arguments for through instance :type kwargs: Any
item: child to add to relation :type item: Model