:py:mod:`oioioi.oi.forms` ========================= .. py:module:: oioioi.oi.forms Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: oioioi.oi.forms.AddSchoolForm oioioi.oi.forms.SchoolSelect oioioi.oi.forms.OIRegistrationForm Functions ~~~~~~~~~ .. autoapisummary:: oioioi.oi.forms.city_options oioioi.oi.forms.school_options .. py:class:: AddSchoolForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=ErrorList, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None) 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:: exclude :annotation: = ['is_active', 'is_approved'] .. py:function:: city_options(province) .. py:function:: school_options(province, city) .. py:class:: SchoolSelect(attrs=None, choices=()) Bases: :py:obj:`django.forms.Select` .. py:method:: render(name, value, attrs=None, renderer=None) Render the widget as an HTML string. .. py:class:: OIRegistrationForm(*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:: exclude :annotation: = ['participant'] .. py:class:: Media Bases: :py:obj:`object` .. py:attribute:: css .. py:attribute:: js :annotation: = ['oi/reg.js'] .. py:method:: set_terms_accepted_text(terms_accepted_phrase) .. py:method:: clean_school() .. py:method:: clean_terms_accepted()