from otree.api import * c = cu doc = 'Get player name or pseudonym' class C(BaseConstants): NAME_IN_URL = 'ID' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): name = models.StringField() class ID(Page): form_model = 'player' form_fields = ['name'] @staticmethod def before_next_page(player: Player, timeout_happened): participant = player.participant participant.name = player.name page_sequence = [ID]