from otree.api import Currency as c, currency_range from ._builtin import Page, WaitPage from .models import Constants class Screen(Page): form_model = 'player' form_fields = ['submitted_answer'] def submitted_answer_choices(self): if self.round_number in Constants.list_a: return Constants.CHOICES_A elif self.round_number in Constants.list_b: return Constants.CHOICES_B elif self.round_number in Constants.list_c: return Constants.CHOICES_C elif self.round_number in Constants.list_d: return Constants.CHOICES_D else: return Constants.CHOICES_E # class IntroWaitPage(WaitPage): # template_name = 'introduction/WaitPage.html' class ResultsWaitPage(WaitPage): def is_displayed(self): return self.round_number == Constants.num_rounds def after_all_players_arrive(self): pass class Results(Page): def is_displayed(self): return self.round_number == Constants.num_rounds page_sequence = [ Screen, ResultsWaitPage, Results ]