from otree.api import * doc = """ Your app description """ class C(BaseConstants): NAME_IN_URL = 'weimar' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 DURATION_PICTURES = 10 #Needed to show the choices in random order (depending on a participants player number) CHOICES_TOPIC = ['Environment','Race Relations','Guns and Firearms','Immigration','Environment','Race Relations','Guns and Firearms','Immigration'] CHEAP_TICKET_PRICE = 0.03 ENDOWMENT_PURCHASE = 3 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): #treatment factors age = models.IntegerField(min=12, max=100) social = models.FloatField() #checksliderSocial = models.FloatField(initial=-1, blank=True) music = models.IntegerField(choices=[[0, 'classic'], [1, 'jazz'], [2, 'rock'], [3, 'pop']]) class survey(Page): form_model = 'player' form_fields = ['age','social','music'] class end(Page): pass page_sequence = [survey,end]