from otree.api import * from otree.models import subsession, player import pandas as pd # import random # import pickle doc = """ Mini-Twitter """ class C(BaseConstants): NAME_IN_URL = 'preStudyQuestionnaure' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 endowment = 100 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): name = models.StringField() # PAGES class IntroPage(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 = [IntroPage]