Beispiel #1
0
class DepartmentSchema(Schema):
    name = string_property(title=_('name'), validator=Length(min=3, max=255))
    description = string_property(title=_('description'),
                                  validator=Length(min=10, max=2000),
                                  missing='')
    exporter_settings = json_property(title=_('exporter_settings'), missing={})
    voting_module_settings = json_property(title=_('voting_module_settings'),
                                           missing={})
class BallotSchema(Schema):
    name = string_property(title=_('name'),
                           validator=Length(min=2, max=23),
                           missing='')
    election = int_property(title=_('election_positions'), missing=0)
    result = json_property(title=_('voting_result'), missing={})
    area_id = int_property(title=_('subject_area'), missing=None)
    voting_id = int_property(title=('voting_phase'), missing=None)
    proposition_type_id = int_property(title=('proposition_type'),
                                       missing=None)
Beispiel #3
0
class PropositionEditSchema(PropositionSchema):
    voting_identifier = string_property(title=_('voting_identifier'),
                                        validator=Length(max=10),
                                        missing=None)
    submitter_invitation_key = string_property(
        title=_('submitter_invitation_key'), missing=None)
    external_discussion_url = string_property(
        title=_('external_discussion_url'), validator=colander.url, missing='')
    status = enum_property(PropositionStatus, title=_('status'))
    visibility = enum_property(PropositionVisibility, title=_('visibility'))
    external_fields = json_property(title=_('external_fields'), missing={})
class VotingPhaseSchema(Schema):
    name = string_property(title=_('name'),
                           validator=Length(min=2, max=23),
                           missing='')
    title = string_property(title=_('title'),
                            validator=Length(min=5, max=160),
                            missing='')
    target = date_property(title=_('target'), missing=None)
    status = enum_property(VotingStatus, title=_('voting_status'))
    department_id = int_property(title=_('department'))
    phase_type_id = int_property(title=_('voting_phase_type'))
    secret = bool_property(title=_('secret_voting_possible'))
    description = string_property(title=_('description'),
                                  validator=Length(min=10, max=65536),
                                  missing='')
    voting_module_data = json_property(title=_('voting_module_data'),
                                       missing={})