from otree.api import * import sys import os sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) from session_utils import update_participant_state, check_session_full, remove_participant, try_add_participant_if_space doc = """ Your app description """ class C(BaseConstants): NAME_IN_URL = 'nickname' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): name = models.StringField() # PAGES class NickName(Page): form_model = 'player' form_fields = ['name'] @staticmethod def is_displayed(player): return True # Let oTree handle participant limits def before_next_page(player: Player, timeout_happened): participant = player.participant participant.name = player.name class ResultsWaitPage(WaitPage): pass class Results(Page): pass page_sequence = [NickName]