from django.utils.translation import ugettext from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range ) doc = '' class Constants(BaseConstants): name_in_url = 'Contact_CRT' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): def email_error_message(self, value): if value not in Constants.email_list: return "Please enter the e-mail address used in your application to the HEC Incubator. " \ "This is necessary for verification purposes." \ " If you don't remember which address you used, please contact us at kerem.kilic@hec.edu" CRT_1 = models.FloatField( label=ugettext("A bat and a ball costs €1.10 in total. The bat costs €1.00 more than the ball. How much does the ball cost?")) CRT_2 = models.FloatField( label=ugettext("If it takes 5 machines 5 minutes to make 5 widgets, how long would it take 100 machines to make 100 widgets?")) CRT_3 = models.FloatField( label=ugettext("In a lake, there is a patch of lily pads. Every day, the patch doubles in size. If it takes 48 days for the patch to cover the entire lake, how long would it take for the patch to cover half of the lake?")) Project_Title = models.StringField(label=ugettext('Project Name'))