from otree.api import Currency as c, currency_range from ._builtin import Page, WaitPage from .models import Constants class Instructions_C(Page): pass class MyPage(Page): form_model = 'player' form_fields = ['Part_Crypto', 'Part_Cash'] def error_message(self, values): print('values is', values) if values['Part_Crypto'] + values['Part_Cash'] != 100: return 'Your choice must add up to 100%' class ResultsWaitPage(WaitPage): pass class Results(Page): pass page_sequence = [Instructions_C, MyPage, ResultsWaitPage, Results]