from otree.api import Currency as c, currency_range from ._builtin import Page, WaitPage from .models import Constants class TestsIntro(Page): form_model = "player" form_fields = ['attended_tests'] timeout_seconds = 60 def vars_for_template(self): return {"image_path": "global/testler_ana_giris.jpg"} def before_next_page(self): self.participant.vars['attended_tests'] = self.player.attended_tests def app_after_this_page(self, upcoming_apps): print('upcoming_apps is', upcoming_apps) if self.player.attended_tests is True: return upcoming_apps[-1] class TestsIntro2(Page): timeout_seconds = 60 def vars_for_template(self): return {"image_path": "global/testler_ana_giris.jpg", 'audio_path': 'global/tests_intro.mp3',} class MyPage(Page): pass class ResultsWaitPage(WaitPage): pass class Results(Page): pass page_sequence = [TestsIntro, TestsIntro2]