from localflavor.generic.models import IBANField from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) author = 'Your name here' doc = """ Your app description """ class Constants(BaseConstants): name_in_url = 'my_survey2' players_per_group = None num_rounds = 1 import random import itertools class Subsession(BaseSubsession): def creating_session(self): import itertools colors = itertools.cycle(['yellow', 'orange', 'black', 'white', 'red', 'green']) for p in self.get_players(): p.color = next(colors) class Group(BaseGroup): pass class Player(BasePlayer): color = models.StringField()