from otree.api import * from .models import C import settings def _debug_ctx(page): return dict( debug_autofill=page.session.config.get('debug', False), debug_auto_submit=page.session.config.get('auto-submit', False) and page.session.config.get('debug', False) , experimental_currency=getattr(settings, 'POINTS_CUSTOM_NAME', 'points'), ) class FinalSurvey0(Page): form_model = 'player' form_fields = [ 'who_am_i_1', 'who_am_i_2', ] def vars_for_template(self): return _debug_ctx(self) class FinalSurvey1(Page): form_model = 'player' form_fields = [ 'age', 'gender', ] def vars_for_template(self): return _debug_ctx(self) class FinalSurvey2(Page): form_model = 'player' form_fields = [ 'ethnicity', 'ethnicity_other', 'father_birth_country', 'mother_birth_country', 'birth_country', 'us_start_age', ] def vars_for_template(self): return _debug_ctx(self) class FinalSurvey4(Page): form_model = 'player' form_fields = [ 'stereotype_asian_trustworthy', 'stereotype_asian_cooperative', 'stereotype_asian_sneaky', 'stereotype_asian_competitive', 'attention_check', 'stereotype_white_trustworthy', 'stereotype_white_cooperative', 'stereotype_white_sneaky', 'stereotype_white_competitive', ] def vars_for_template(self): return _debug_ctx(self) class FinalSurvey3(Page): form_model = 'player' form_fields = [ 'gender_stereotype_generous', 'gender_stereotype_lazy', 'gender_stereotype_frugal', 'gender_stereotype_impatient', 'gender_stereotype_studious', 'gender_stereotype_reckless', ] def vars_for_template(self): return _debug_ctx(self) class FinalSurvey5(Page): form_model = 'player' form_fields = [ 'considered_identity', 'considered_identity_details', 'suspicion_level', ] def vars_for_template(self): return _debug_ctx(self) page_sequence = [FinalSurvey0, FinalSurvey1, FinalSurvey2, FinalSurvey3, FinalSurvey4, FinalSurvey5,]