from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) author = 'Your name here' doc = """ Your app description """ class Constants(BaseConstants): name_in_url = 'nativeads' players_per_group = 3 num_rounds = 1 conditions = ["A", "B"] class Subsession(BaseSubsession): def before_session_starts(self): for g in self.get_groups(): g.treatment = 'None' class Group(BaseGroup): treatment = models.StringField() class Player(BasePlayer): ads_notice = models.StringField( choices=['Yes', 'No'], doc="""Please choose one of the options""", ) ads_recall = models.StringField( choices = ['Silk', 'Blue Diamond', 'Mivo', 'Pearl', 'Jova', 'Taobao', 'Not sure'], doc="""Please choose one of the options""", ) ads_intention = models.StringField( choices=['Extremely unlikely', 'Unlikely', 'Neutral', 'Likely', 'Extremely likely'], doc="""Please choose one of the options""", ) ads_wtp = models.FloatField() gender = models.StringField( choices=['Male', 'Female', 'Other'], doc="""Please choose one of the options""", ) age = models.PositiveIntegerField() race = models.StringField( choices=["White", "Hispanic or Latino", "Black or African American", "Native American or American Indian", "Asian / Pacific Islander", "Other"] ) click = models.StringField( blank=True ) interest_game = models.StringField( choices=['Not at all', 'Slightly interesting', 'Moderately interesting', 'Interesting', 'Extremely Interesting'], doc="""Please choose one of the options""", ) game_live = models.StringField( choices=['Yes', 'No'], doc="""Please choose one of the options""", ) game_freq = models.StringField( choices=['Less than 1 hour per week', '1-10 hours per week', '10-20 hours per week', '20-30 hours per week', 'More than 30 hours per week'], doc="""Please choose one of the options""", ) feedback = models.LongStringField( blank=True ) income = models.StringField( choices=['$0', '$1 to $9,999', '$10,000 to $24,999', '$25,000 to $49,999', '$50,000 to $74,999', '$75,000 to $99,999', '>$100,000'], ) ads_eval = models.StringField( choices=['Extremely Unattractive', 'Unattractive', 'Neutral', 'Attractive', 'Extremely attractive'], doc="""Please choose one of the options""", ) diff_num = models.IntegerField() diff = models.LongStringField()