from otree.api import * author = 'Patricia Zauchner (zauchner@uni-bremen.de)' doc = """ Consent form. """ class Constants(BaseConstants): name_in_url = 'consent' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): consent = models.IntegerField( doc="Does the person agree to the consent form?", ) email = models.StringField( doc="E-mail for registrations only" ) class Consent(Page): form_model = "player" form_fields = ['consent'] class NoConsent(Page): @staticmethod def is_displayed(player): return player.consent == 0 page_sequence = [ Consent, NoConsent ]