A OneToOneField is essentially the same as a ForeignKey, with the exception
- class oioioi.participants.fields.OneToOneBothHandsCascadingParticipantField(to, on_delete, to_field=None, **kwargs)¶
A OneToOneField is essentially the same as a ForeignKey, with the exception that it always carries a “unique” constraint with it and the reverse relation always returns the object pointed to (since there will only ever be one), rather than returning a list.
- contribute_to_class(cls, name)¶
Register the field with the model class it belongs to.
If private_only is True, create a separate instance of this field for every subclass of cls, even if cls is not an abstract model.