from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range, ) from datetime import date from django import forms teams = ['Arsenal', 'Chelsea', 'Liverpool', 'Manchester City', 'Manchester United', 'Tottenham Hotspur', 'Aston Villa', 'Brentford', 'Bournemouth','Brighton and Hove Albion', 'Crystal Palace', 'Everton', 'Fulham', 'Leeds United', 'Leicester City', 'Newcastle United', 'Nottingham Forest', 'Southampton', 'West Ham United', 'Wolverhampton Wanderers', 'None'] class Constants(BaseConstants): name_in_url = 'PremierLeague_UK_Teams' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): fav_club = models.StringField(choices=teams, label='', widget=widgets.RadioSelect) fav_club_strength = models.IntegerField(label='', min=1, max=5) least_fav_club = models.StringField(choices=teams, label='', widget=widgets.RadioSelect) fav_team_time = models.FloatField() least_fav_team_time = models.FloatField()