:py:mod:`oioioi.participants.models` ==================================== .. py:module:: oioioi.participants.models Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: oioioi.participants.models.Participant oioioi.participants.models.Region oioioi.participants.models.RegistrationModel oioioi.participants.models.OpenRegistration oioioi.participants.models.OnsiteRegistration oioioi.participants.models.TestRegistration oioioi.participants.models.TermsAcceptedPhrase Attributes ~~~~~~~~~~ .. autoapisummary:: oioioi.participants.models.participant_statuses .. py:data:: participant_statuses .. py:class:: Participant(*args, **kwargs) Bases: :py:obj:`django.db.models.Model` Make subclasses preserve the alters_data attribute on overridden methods. .. py:class:: Meta Bases: :py:obj:`object` .. py:attribute:: unique_together :annotation: = ['contest', 'user'] .. py:property:: registration_model .. py:attribute:: contest .. py:attribute:: user .. py:attribute:: status .. py:attribute:: anonymous .. py:method:: __str__() Return str(self). .. py:method:: erase_data() Replaces (and saves) values of every field to values suggesting that the account is deleted. Purpose: delete user's private data from the system. Used only when account is being deleted by user. .. py:class:: Region(*args, **kwargs) Bases: :py:obj:`django.db.models.Model` Make subclasses preserve the alters_data attribute on overridden methods. .. py:class:: Meta Bases: :py:obj:`object` .. py:attribute:: unique_together :annotation: = ['contest', 'short_name'] .. py:attribute:: short_name .. py:attribute:: name .. py:attribute:: contest .. py:attribute:: region_server .. py:method:: __str__() Return str(self). .. py:class:: RegistrationModel(*args, **kwargs) Bases: :py:obj:`django.db.models.Model` Make subclasses preserve the alters_data attribute on overridden methods. .. py:class:: Meta Bases: :py:obj:`object` .. py:attribute:: abstract :annotation: = True .. py:attribute:: participant .. py:method:: erase_data() .. py:class:: OpenRegistration(*args, **kwargs) Bases: :py:obj:`RegistrationModel` Make subclasses preserve the alters_data attribute on overridden methods. .. py:attribute:: terms_accepted .. py:method:: erase_data() .. py:class:: OnsiteRegistration(*args, **kwargs) Bases: :py:obj:`RegistrationModel` Make subclasses preserve the alters_data attribute on overridden methods. .. py:class:: Meta Bases: :py:obj:`object` .. py:attribute:: unique_together :annotation: = ['region', 'local_number'] .. py:attribute:: number .. py:attribute:: region .. py:attribute:: local_number .. py:method:: __str__() Return str(self). .. py:method:: erase_data() .. py:class:: TestRegistration(*args, **kwargs) Bases: :py:obj:`RegistrationModel` Make subclasses preserve the alters_data attribute on overridden methods. .. py:attribute:: __test__ :annotation: = False Used only for testing .. py:attribute:: name .. py:class:: TermsAcceptedPhrase(*args, **kwargs) Bases: :py:obj:`django.db.models.Model` This model stores text asking user to accept contest's terms. It is used in contests with custom registration: PA and OI. .. py:class:: Meta Bases: :py:obj:`object` .. py:attribute:: verbose_name_plural .. py:attribute:: verbose_name .. py:attribute:: text .. py:attribute:: contest .. py:method:: __str__() Return str(self).