Exemplo n.º 1
0
class ParticipantDummyForm(OrderedFieldsForm):

    CUSTOM_FIELD_TYPE = 'participant'

    category_id = CategoryField('Category', validators=[InputRequired()],
                                coerce=int, choices=[])
    email = EmailField('Email', validators=[EmailValidator(), InputRequired()])

    language = LanguageField('Working language',
                             choices=Participant.LANGUAGE_CHOICES)

    class Meta:
        model = Participant
        exclude = ('deleted', 'registration_token', 'participant_type',
                   'representing')
        field_order = ('title', 'first_name', 'last_name', 'badge_name', 'sex',
                       'language', 'country', 'email', 'category_id',
                       'represented_organization', 'represented_country',
                       'represented_region', 'attended', 'verified',
                       'credentials')
        visible_on_registration_form = (
            'title', 'first_name', 'last_name', 'email', 'category_id', 'sex',
            'language', 'country', 'represented_country',
            'represented_organization',)
        field_args = {
            'language': {'validators': [InputRequired()]},
            'country': {'validators': [InputRequired()]}
        }
        protected_fields = ('title', 'email', 'category_id', 'country')
Exemplo n.º 2
0
class DefaultMediaParticipantDummyForm(BaseForm):

    CUSTOM_FIELD_TYPE = 'media'

    email = EmailField('Email', validators=[EmailValidator(), InputRequired()])

    class Meta:
        model = Participant
        only = ('title', 'first_name', 'last_name', 'email', 'verified')
        visible_on_registration_form = []
        protected_fields = []
Exemplo n.º 3
0
class DefaultParticipantDummyForm(BaseForm):

    CUSTOM_FIELD_TYPE = 'participant'

    email = EmailField('Email', validators=[EmailValidator(), InputRequired()])

    class Meta:
        model = Participant
        exclude = ('deleted', 'registration_token', 'participant_type',
                   'attended', 'verified', 'credentials')
        visible_on_registration_form = []
        field_args = {
            'language': {'validators': [InputRequired()]},
            'country': {'validators': [InputRequired()]}
        }
        protected_fields = []
Exemplo n.º 4
0
class MediaParticipantDummyForm(OrderedFieldsForm):

    CUSTOM_FIELD_TYPE = 'media'

    category_id = CategoryField('Category', validators=[InputRequired()],
                                coerce=int, choices=[])
    email = EmailField('Email', validators=[EmailValidator(), InputRequired()])

    class Meta:
        model = Participant
        only = ('title', 'first_name', 'last_name', 'email', 'category_id',
                'verified')
        visible_on_registration_form = (
            'title', 'first_name', 'last_name', 'email', 'category_id')
        field_order = ('title', 'first_name', 'last_name', 'email',
                       'category_id', 'verified')
        protected_fields = ('title', 'email', 'category_id', 'country')