from otree.api import Currency as c, currency_range from ._builtin import Page, WaitPage from .models import Constants class MyPage(Page): pass class Mobile(Page): def is_displayed(self): user_agent = self.request.META['HTTP_USER_AGENT'] is_mobile = False for substring in ['Mobi', 'Android']: if substring in user_agent: is_mobile = True return is_mobile class GeneralIntro(Page): def app_after_this_page(self, upcoming_apps): if self.participant.vars['chosen_app'] == 1: return upcoming_apps[0] else: return upcoming_apps[1] class ResultsWaitPage(WaitPage): def after_all_players_arrive(self): pass class Results(Page): pass page_sequence = [ Mobile, GeneralIntro, ]