from otree.api import Currency as c, currency_range from ._builtin import Page, WaitPage from .models import Constants from . import models import random class ThankYou(Page): form_model = models.Player form_fields = ['comments', ] class ResultsWaitPage(WaitPage): pass class Results(Page): form_model = 'player' form_fields = [ 'BANKname', 'BANKiban', 'Email', ] def vars_for_template(self): # specify info for task progress section = int(3) section_total = int(3) section_progress = int(section / section_total * 100) # specify info for page progress bar total = int(2) page = int(1) progress = int(page / total * 100) # random.randint(0, 1) # self.participant.base_or_treatment = base_or_treatment return { 'section' : section, 'section_total': section_total, 'section_progress': section_progress, 'page': page, 'total': total, 'progress': progress, # 'total_return_B' : total_return_B, # 'total_return_T' : total_return_T, # 'base_or_treatment': self.player.participant['base_or_treatment'], # 'final_return' : final_return, } page_sequence = [Results, ThankYou]