from otree.api import Currency as c, currency_range from ._builtin import Page, WaitPage from .models import Constants class Introduction(Page): form_model = 'player' form_fields = ['subject_id'] class Verbal_Instructions(Page): def is_displayed(self): return True class Info(Page): form_model = 'player' form_fields = ['name'] def before_next_page(self): self.player.set_all_in_vars() class Assignment(Page): def is_displayed(self): return False def vars_for_template(self): return { 'treatment_indicator': self.player.participant.vars['treatment_indicator'], } class Colour(Page): def vars_for_template(self): return { 'treatment_colour': self.player.participant.vars['colour'], } page_sequence = [ Introduction, Verbal_Instructions, #Info, Assignment, Colour, ]