oioioi.participants.fields

Module Contents

Classes

OneToOneBothHandsCascadingParticipantField

A OneToOneField is essentially the same as a ForeignKey, with the exception

Functions

delete_related_participants_handler(sender, instance, ...)

class oioioi.participants.fields.OneToOneBothHandsCascadingParticipantField(to, on_delete, to_field=None, **kwargs)[source]

Bases: django.db.models.OneToOneField

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)[source]

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.