:py:mod:`oioioi.questions.models` ================================= .. py:module:: oioioi.questions.models Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: oioioi.questions.models.Message oioioi.questions.models.ReplyTemplate oioioi.questions.models.MessageView oioioi.questions.models.MessageNotifierConfig oioioi.questions.models.QuestionSubscription Functions ~~~~~~~~~ .. autoapisummary:: oioioi.questions.models.send_notification Attributes ~~~~~~~~~~ .. autoapisummary:: oioioi.questions.models.message_kinds oioioi.questions.models.message_kind_labels oioioi.questions.models.logger .. py:data:: message_kinds .. py:data:: message_kind_labels .. py:data:: logger .. py:class:: Message(*args, **kwargs) Bases: :py:obj:`django.db.models.Model` Make subclasses preserve the alters_data attribute on overridden methods. .. py:property:: to_quote .. py:attribute:: contest .. py:attribute:: round .. py:attribute:: problem_instance .. py:attribute:: top_reference .. py:attribute:: author .. py:attribute:: kind .. py:attribute:: topic .. py:attribute:: content .. py:attribute:: date .. py:attribute:: pub_date .. py:attribute:: marked_read_by .. py:attribute:: mail_sent .. py:method:: save(*args, **kwargs) Save the current instance. Override this in a subclass if you want to control the saving process. The 'force_insert' and 'force_update' parameters can be used to insist that the "save" must be an SQL insert or update (or equivalent for non-SQL backends), respectively. Normally, they should not be set. .. py:method:: can_have_replies() .. py:method:: _has_category() .. py:method:: __str__() Return str(self). .. py:method:: get_absolute_url() .. py:method:: get_user_date() returns date visible by a user .. py:method:: get_kind_label() .. py:class:: ReplyTemplate(*args, **kwargs) Bases: :py:obj:`django.db.models.Model` Make subclasses preserve the alters_data attribute on overridden methods. .. py:property:: visible_name .. py:attribute:: contest .. py:attribute:: name .. py:attribute:: content .. py:attribute:: usage_count .. py:method:: __str__() Return str(self). .. py:class:: MessageView(*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: = ['message', 'user'] .. py:attribute:: message .. py:attribute:: user .. py:attribute:: date .. py:class:: MessageNotifierConfig(*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:attribute:: verbose_name .. py:attribute:: verbose_name_plural .. py:attribute:: contest .. py:attribute:: user .. py:function:: send_notification(sender, instance, created, **kwargs) .. py:class:: QuestionSubscription(*args, **kwargs) Bases: :py:obj:`django.db.models.Model` Make subclasses preserve the alters_data attribute on overridden methods. .. py:attribute:: user .. py:attribute:: contest