from otree.api import Currency as c, currency_range from ._builtin import Page, WaitPage from .models import Constants class Instruction(Page): pass class Practice1_Maze(Page): form_model = 'player' form_fields = ['seconds'] pass class Practice2_Evaluation(Page): def vars_for_template(self): gender_A = Constants.List_playerA[Constants.item-1]['gender'] social_class_A = Constants.List_playerA[Constants.item-1]['social_class'] pastime_A = Constants.List_playerA[Constants.item-1]['pastime'] height_A = Constants.List_playerA[Constants.item-1]['height'] score_A = Constants.List_playerA[Constants.item-1]['score'] round_A = Constants.List_playerA[Constants.item-1]['rounds'] gender_B = Constants.List_playerB[Constants.item-1]['gender'] social_class_B = Constants.List_playerB[Constants.item-1]['social_class'] pastime_B = Constants.List_playerB[Constants.item-1]['pastime'] height_B = Constants.List_playerB[Constants.item-1]['height'] score_B = Constants.List_playerB[Constants.item-1]['score'] round_B = Constants.List_playerB[Constants.item-1]['rounds'] return dict( gender_A = gender_A, social_class_A = social_class_A, pastime_A = pastime_A, height_A = height_A, score_A = score_A, round_A = round_A, gender_B = gender_B, social_class_B = social_class_B, pastime_B = pastime_B, height_B = height_B, score_B = score_B, round_B = round_B ) page_sequence = [Instruction, Practice1_Maze, Practice2_Evaluation]