from otree.api import * doc = """ Your app description """ class C(BaseConstants): NAME_IN_URL = 'StartSurvey_NoItem' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 TIMER_TEXT = "शेष समय:" class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): total_beggars = models.IntegerField(min=0, max=100, default=100) total_moving = models.IntegerField(min=0, max=100, default=100) total_stationary = models.IntegerField(min=0, max=100, default=100) total_male = models.IntegerField(min=0, max=100, default=100) total_female = models.IntegerField(min=0, max=100, default=100) total_other_gender = models.IntegerField(min=0, max=100, default=100) total_kids = models.IntegerField(min=0, max=100, default=100) total_teenagers = models.IntegerField(min=0, max=100, default=100) total_adults = models.IntegerField(min=0, max=100, default=100) total_seniors = models.IntegerField(min=0, max=100, default=100) total_alone = models.IntegerField(min=0, max=100, default=100) total_in_group = models.IntegerField(min=0, max=100, default=100) total_with_child = models.IntegerField(min=0, max=100, default=100) total_disabled = models.IntegerField(min=0, max=100, default=100) total_able = models.IntegerField(min=0, max=100, default=100) total_with_footwear = models.IntegerField(min=0, max=100, default=100) total_without_footwear = models.IntegerField(min=0, max=100, default=100) total_fully_clothed = models.IntegerField(min=0, max=100, default=100) total_partially_clothed = models.IntegerField(min=0, max=100, default=100) total_religious_clothed = models.IntegerField(min=0, max=100, default=100) page_pass_time = models.FloatField() class BeggarsTable(Page): @staticmethod def is_displayed(player: Player): return player.round_number == 1 timeout_seconds = 60 form_model = "player" form_fields = [ "total_beggars", "total_moving", "total_stationary", "total_male", "total_female", "total_other_gender", "total_kids", "total_teenagers", "total_adults", "total_seniors", "total_alone", "total_in_group", "total_with_child", "total_disabled", "total_able", "total_with_footwear", "total_without_footwear", "total_fully_clothed", "total_partially_clothed", "total_religious_clothed" ] @staticmethod def before_next_page(player: Player, timeout_happened): participant = player.participant participant.total_beggars = player.total_beggars class Intro(Page): pass page_sequence = [Intro, BeggarsTable]