import numpy as np from numpy import log as ln import math from otree.api import * doc = """ Your app description """ class C(BaseConstants): NAME_IN_URL = 'consent' PLAYERS_PER_GROUP = 2 INSTRUCTIONS_TEMPLATE = 'consent/consnet.html' NUM_ROUNDS = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): offer_accepted = models.BooleanField(choices=[ [False, 'I am not agree'], [True, 'I agree'], ]) # PAGES class consent(Page): form_model = 'player' form_fields = ['offer_accepted'] class error(Page): @staticmethod def is_displayed(player: Player): return player.offer_accepted == False class ResultsWaitPage(WaitPage): pass class Results(Page): pass page_sequence = [consent, error]