from otree.api import * doc = """ Your app description """ class C(BaseConstants): NAME_IN_URL = 'end' PLAYERS_PER_GROUP = None NUM_ROUNDS = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): pass # PAGES class End1(Page): form_model = 'player' def is_displayed(player): participant = player.participant return participant.Consent == 0 class End2(Page): form_model = 'player' def is_displayed(player): participant = player.participant return participant.Consent == 1 def vars_for_template(player: Player): return dict( payment=player.participant.payment, ) page_sequence = [End1,End2]