from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) import random doc = """ Demographics survey for public good games """ class Constants(BaseConstants): name_in_url = 'Instructions' players_per_group = 4 num_rounds = 1 endowment = c(100) instructions_template = 'introduction_for_public_goods/Instructions.html' class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): age = models.PositiveIntegerField( verbose_name='What is your age?', min=18, max=125) gender = models.StringField( choices=['Male', 'Female'], verbose_name='What is your gender?', widget=widgets.RadioSelect)