:py:mod:`oioioi.questions.forms` ================================ .. py:module:: oioioi.questions.forms Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: oioioi.questions.forms.AddContestMessageForm oioioi.questions.forms.AddReplyForm oioioi.questions.forms.ChangeContestMessageForm oioioi.questions.forms.FilterMessageForm oioioi.questions.forms.FilterMessageAdminForm .. py:class:: AddContestMessageForm(request, *args, **kwargs) Bases: :py:obj:`django.forms.ModelForm` The main implementation of all the Form logic. Note that this class is different than Form. See the comments by the Form class for more info. Any improvements to the form API should be made to this class, not to the Form class. .. py:class:: Meta Bases: :py:obj:`object` .. py:attribute:: model .. py:attribute:: fields :annotation: = ['category', 'topic', 'content', 'pub_date'] .. py:attribute:: help_texts .. py:attribute:: category .. py:method:: save(commit=True, *args, **kwargs) Save this form's self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance. .. py:class:: AddReplyForm(*args, **kwargs) Bases: :py:obj:`AddContestMessageForm` The main implementation of all the Form logic. Note that this class is different than Form. See the comments by the Form class for more info. Any improvements to the form API should be made to this class, not to the Form class. .. py:class:: Meta Bases: :py:obj:`AddContestMessageForm` .. py:attribute:: fields :annotation: = ['kind', 'topic', 'content', 'pub_date'] .. py:attribute:: save_template .. py:method:: save(commit=True, *args, **kwargs) Save this form's self.instance object if commit=True. Otherwise, add a save_m2m() method to the form which can be called after the instance is saved manually at a later time. Return the model instance. .. py:class:: ChangeContestMessageForm(kind, *args, **kwargs) Bases: :py:obj:`AddContestMessageForm` The main implementation of all the Form logic. Note that this class is different than Form. See the comments by the Form class for more info. Any improvements to the form API should be made to this class, not to the Form class. .. py:class:: Meta Bases: :py:obj:`AddContestMessageForm` .. py:attribute:: fields :annotation: = ['category', 'kind', 'topic', 'content', 'pub_date'] .. py:class:: FilterMessageForm(request, *args, **kwargs) Bases: :py:obj:`django.forms.Form` A collection of Fields, plus their associated data. .. py:attribute:: TYPE_ALL_MESSAGES :annotation: = all .. py:attribute:: TYPE_PUBLIC_ANNOUNCEMENTS :annotation: = public .. py:attribute:: TYPE_ALL_CATEGORIES :annotation: = all .. py:attribute:: message_type .. py:attribute:: category .. py:class:: FilterMessageAdminForm(request, *args, **kwargs) Bases: :py:obj:`FilterMessageForm` A collection of Fields, plus their associated data. .. py:attribute:: author