from otree.api import Currency as c, currency_range from ._builtin import Page, WaitPage from .models import Constants import random class Introduction(Page): form_model = 'player' class Part1(Page): form_model = 'player' def before_next_page(self): self.participant.vars['num_for_bonus'] = random.randint(1,30) class Example(Page): form_model = 'player' page_sequence = [Introduction, Part1, Example]