from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range, ) class Constants(BaseConstants): name_in_url = 'survey' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): Name_surname = models.IntegerField(label='1. What is your name and surname?') age = models.IntegerField(label='2. How old are you? ?') gender = models.StringField( choices=['Male', 'Female', 'Other'], label='3. What is your gender?', widget=widgets.RadioSelect, ) ethnicity = models.StringField( choices=['Black African', 'Colored', 'Indian/Asian', 'White'], label='4. What is your enthnicity?', widget=widgets.RadioSelect, ) Mother_tongue = models.IntegerField(label='5. What is your mother tongue (language)?') Highest_education = models.StringField( choices=['No formal education', 'Below matric', 'Matric', 'University education', 'Post-graduate studies', 'Prefer not to say'], label='6. What is your ethnicity ?', widget=widgets.RadioSelect, ) Employment_status = models.StringField( choices=['Permanently employed', 'Contract', 'Unemployed', 'Self-employed', 'Prefer not to say'], label='7. What is your employment status? ', widget=widgets.RadioSelect, ) Housed_income_source = models.StringField( choices=['Salaries/Wages', 'Social grants', 'Pension', 'Remittances', 'Business income', 'Farming/Agricultural activities', 'Other'], label='8. What is your household’s main source of income?', widget=widgets.RadioSelect, ) Housed_Total_monthly_income = models.StringField( choices=['Less than R 500', 'Between R 500 and R 1000', 'Between R 1000 and R 3000', 'Between R 3000 and R 5000', 'More than R5000', 'Prefer not to answer'], label='9. What is your household’s total monthly income?', widget=widgets.RadioSelect, ) Marital_status = models.StringField( choices=['Single', 'Cohabitant', 'Married', 'Separated', 'Divorced', 'Widowed', 'I prefer not to answer'], label='10. What is your marital status? ', widget=widgets.RadioSelect, ) Relationship_tothe_head = models.StringField( choices=['Self', 'Spouse', 'Child', 'Parent', 'Sibling', 'I do not know', 'I prefer not to answer'], label='11. What is your relationship to the head of the household? ', widget=widgets.RadioSelect, ) Residence_type = models.StringField( choices=['Rented rooms', 'Squatter camp', 'Reconstruction and Development Programme (RDP) Houses', 'Rented flat or house', 'Own a house or flat', 'I do not know', 'I prefer not to answer'], label='12. Do you or your household live in a ', widget=widgets.RadioSelect, ) crt_bat = models.IntegerField( label=''' A bat and a ball cost 22 dollars in total. The bat costs 20 dollars more than the ball. How many dollars does the ball cost?''' ) crt_lake = models.IntegerField( label=''' 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 many days would it take for the patch to cover half of the lake? ''' )