from otree.api import * import random doc = """ Your app description """ class C(BaseConstants): NAME_IN_URL = 'newdesign' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): int1 = models.IntegerField(min=0, max=100) int2 = models.IntegerField(min=0, max=100) # def yellowboxrandom(): # colors = ['yellow','green'] # result = [] # for i in range(10): # k = random.choice(colors, weights = [0.75, 0.25]) # result.append(k) # print(' , '.join(result)) # return result # def greenboxrandom(): # colors = ['yellow','green'] # result = [] # for i in range(10): # k = random.choice(colors, weights = [0.25, 0.75]) # result.append(k) # print(' , '.join(result)) # return result # PAGES class Instructions(Page): form_model = 'player' class Practice(Page): form_model = 'player' class TrialTest(Page): form_model = 'player' form_fields = ['int1', 'int2'] page_sequence = [Instructions, Practice, #TrialTest ]