from otree.api import Currency as c, currency_range from ._builtin import Page, WaitPage from .models import Constants import random class experience_experiment(Page): form_model = "player" form_fields = ["enjoyment", "satisfaction_trading", "better_others", "reminders", "know_friend", "discuss_friends", "info_get"] #timeout_seconds = 120 class mistakes_made(Page): form_model = "player" form_fields = ["sell_losing", "buy_winning", "sell_winning", "buy_losing"] #timeout_seconds = 120 class choice_restrictions_1(Page): form_model = "player" form_fields = ["choice_restrictions"] #timeout_seconds = 120 class choice_restrictions_2(Page): form_model = "player" def get_form_fields(self): if self.player.choice_restrictions == 1: return ["choice_restrictions_yes", "choice_restrictions_yes_other"] else: return ["choice_restrictions_no", "choice_restrictions_no_other"] page_sequence = [ experience_experiment, mistakes_made, choice_restrictions_1, choice_restrictions_2, ]