from ._builtin import Page, WaitPage # from otree.api import Currency as c, currency_range from .models import Constants from django.template.defaulttags import register import random @register.filter def get_choices(choice_history, round_num): return choice_history[round_num-1] class Name(Page): def is_displayed(self): return self.round_number == 1 def vars_for_template(self): return { 'num_rounds': Constants.num_rounds } form_model = 'player' form_fields = ['name'] class Introduction(Page): def is_displayed(self): return self.round_number == 1 def vars_for_template(self): return { 'num_rounds': Constants.num_rounds, 'rounds_per_session': Constants.rounds_per_session } # timeout_seconds = 100 page_sequence = [ Name, Introduction ]