from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) import decimal import random #from django.core.mail import send_mail # from otree import widgets from django.db import models as django_models author = '' doc = """ Start Page for Online Experiments """ class Constants(BaseConstants): name_in_url = 'IajrWRoi' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): consent = models.IntegerField( label='Consent declaration:', initial=None, choices=[ [1, 'I have read and understood the stated terms. I had enough time to make a decision. Herewith, I consent to participate in this study.'], [0, 'I choose not to participate in this study.'] ], widget=widgets.RadioSelect ) prolific_id = models.StringField() # Save user's browser data on StartPage Page, # before mobiles are screened out. user_agent = models.StringField() window_height = models.StringField() window_width = models.StringField() is_iPad = models.BooleanField() # warnings/time spent Intro_warnings = models.IntegerField() Intro_time_spent = models.FloatField(blank=True)