def __init__(self, *args, **kwargs): super(AddWorkshopToJam, self).__init__(*args, **kwargs) self.workshop.choices = [(workshop.workshop_id, workshop.workshop_title) for workshop in get_workshops_to_select()] self.volunteer.choices = [(-1, "None")] + get_volunteers_to_select() self.room.choices = get_workshop_rooms()
class AddWorkshopToJam(Form): workshop = SelectField("Workshop", choices=get_workshops_to_select()) volunteer = SelectField("Coordinator", choices=get_volunteers_to_select()) slot = SelectField("Time slot", choices=get_individual_time_slots_to_select()) room = SelectField("Room", choices=get_workshop_rooms()) pilot = SelectField("Pilot", choices=[("False", "False"), ("True", "True")]) def __init__(self, *args, **kwargs): super(AddWorkshopToJam, self).__init__(*args, **kwargs) self.workshop.choices = [(workshop.workshop_id, workshop.workshop_title) for workshop in get_workshops_to_select()] self.volunteer.choices = [(-1, "None")] + get_volunteers_to_select() self.room.choices = get_workshop_rooms()