from otree.api import Currency as c, currency_range from ._builtin import Page, WaitPage from .models import Constants class Intro(Page): def is_displayed(self): return self.round_number == 1 pass class Contribution(Page): form_model = 'player' form_fields = ['contribution'] def vars_for_template(self): return {'mylabel': 'Invest something'} def contribution_max(self): return self.player.endowment class BeforeResultsWP(WaitPage): def after_all_players_arrive(self): self.group.set_payoffs() pass class Results(Page): pass class FinalResults(Page): def is_displayed(self): return self.round_number == Constants.num_rounds pass page_sequence = [ Intro, Contribution, BeforeResultsWP, Results, FinalResults ]