def apply_model(self, model):
    self.number.data = model.number
    self.group.data = model.group
    self.duration.data = model.duration
    self.description.data = model.description
    self.type.data = model.type
    self.simple_vote.data = ''
    self.complex_vote.data = ''
    self.majorz_election.data = ''
    self.proporz_election.data = ''
    self.election_compound.data = ''
    if (self.type.data == 'simple_vote'):
        self.simple_vote.data = model.vote_id
    elif (self.type.data == 'complex_vote'):
        self.complex_vote.data = model.vote_id
    elif (self.type.data == 'majorz_election'):
        self.majorz_election.data = model.election_id
    elif (self.type.data == 'proporz_election'):
        self.proporz_election.data = model.election_id
    elif (self.type.data == 'election_compound'):
        self.election_compound.data = model.election_compound_id
    self.structure.data = model.structure
    self.css.data = model.css
def apply_model(self, model):
    self.number.data = model.number
    self.group.data = model.group
    self.duration.data = model.duration
    self.description.data = model.description
    self.type.data = model.type
    self.simple_vote.data = 
    self.complex_vote.data = 
    self.majorz_election.data = 
    self.proporz_election.data = 
    self.election_compound.data = 
    if (self.type.data == 'simple_vote'):
        self.simple_vote.data = model.vote_id
    elif (self.type.data == 'complex_vote'):
        self.complex_vote.data = model.vote_id
    elif (self.type.data == 'majorz_election'):
        self.majorz_election.data = model.election_id
    elif (self.type.data == 'proporz_election'):
        self.proporz_election.data = model.election_id
    elif (self.type.data == 'election_compound'):
        self.election_compound.data = model.election_compound_id
    self.structure.data = model.structure
    self.css.data = model.css