from otree.api import Currency as c, currency_range from ._builtin import Page, WaitPage from .models import Constants import time class MyPage(Page): def vars_for_template(self): self.participant.vars['time_started'] = time.time() return dict(link="https://www.youtube.com/embed/{}".format(self.player.weblink) ) class ResultsWaitPage(WaitPage): pass class Results(Page): def vars_for_template(self): self.player.total_seconds = time.time() - self.participant.vars['time_started'] page_sequence = [MyPage, Results]