from otree.api import Currency as c, currency_range from ._builtin import Page, WaitPage from .models import Constants class Instructions(Page): def vars_for_template(self): return { 'treatment_group': self.participant.vars["treatment_group"], } class Contribute_unconditional(Page): form_model = 'player' form_fields = ['contribution_unconditional'] def vars_for_template(self): return { 'treatment_group': self.participant.vars["treatment_group"], } class Contribute_conditional(Page): form_model = "player" def get_form_fields(self): return ['contribution_conditional_{}'.format(i) for i in range(0, 21)] def vars_for_template(self): return { 'treatment_group': self.participant.vars["treatment_group"], } page_sequence = [Instructions, Contribute_unconditional, Contribute_conditional]