from otree.api import Currency as c, currency_range from ._builtin import Page, WaitPage from .models import Constants class Instruction1(Page): form_model = 'player' class Instruction2(Page): form_model = 'player' class Instruction3(Page): form_model = 'player' class Choice(Page): form_model = 'player' form_fields = ['First_choice', 'Second_choice', 'Third_choice', 'Fourth_choice', 'Fifth_choice'] def error_message(self, values): pass if not values['First_choice'] != values['Second_choice'] != values['Third_choice'] != values['Fourth_choice'] != values['Fifth_choice']: return '您的选项有重复,请重新选择' class MyWaitPage(WaitPage): after_all_players_arrive = 'Results' class Results(Page): form_model = 'player' page_sequence = [Instruction1, Instruction2, Instruction3, Choice, MyWaitPage, Results]