choice_set is not defined anywhere.
Django creates APIs for the βotherβ side of the relationship β a link from a related model to a model that defines the relationship. For example, a Poll p object has access to a list of all related Choice objects through the choice_set attribute: p.choice_set.all ().
So choice_set. Where selection is your lowercase selection model, and _set is the Django Manager tool.
You can read the details right here .
source share