from otree.api import Currency as c, currency_range from ._builtin import Page, WaitPage from .models import Constants class Introduction(Page): pass class Dummy(Page): form_model = 'player' form_fields = ['dummy'] class No_short(Page): def is_displayed(self): return self.player.dummy == False form_model = 'player' form_fields = ['no_short_discount', 'no_long_discount'] class No_approach(Page): def is_displayed(self): return self.player.dummy == False form_model = 'player' form_fields = ['no_approach', 'other'] class No_familiar(Page): def is_displayed(self): return self.player.dummy == False form_model = 'player' form_fields = ['no_familiar'] class Node(Page): def is_displayed(self): return self.player.dummy == False form_model = 'player' form_fields = ['no_gender', 'no_age', 'no_country', 'no_profession', 'no_field', 'no_other_field'] class Yes_qualitative(Page): def is_displayed(self): return self.player.dummy == True form_model = 'player' form_fields = ['yes_railway_climate','yes_railway_hospital'] class Yes_short(Page): def is_displayed(self): return self.player.dummy == True form_model = 'player' form_fields = ['yes_short_discount_sure','yes_short_market','yes_short_discount_railroads','yes_short_discount_health', 'yes_short_discount_debt', 'yes_short_discount_climate' ] class Yes_approach(Page): def is_displayed(self): return self.player.dummy == True form_model = 'player' form_fields = ['yes_approach', 'yes_otherapproach' ] class Yes_beta(Page): def is_displayed(self): return self.player.dummy == True form_model = 'player' form_fields = ['yes_diversification', 'yes_recommend' ] class Yes_familiar(Page): def is_displayed(self): return self.player.dummy == True form_model = 'player' form_fields = ['yes_familiar'] class Yesde(Page): def is_displayed(self): return self.player.dummy == True form_model = 'player' form_fields = ['yes_gender', 'yes_age', 'yes_country', 'yes_profession', 'yes_field', 'yes_other_field'] class End(Page): pass page_sequence = [ Introduction, Dummy, No_short, No_approach, No_familiar, Node, Yes_qualitative, Yes_short, Yes_approach, Yes_beta, Yes_familiar, Yesde, End, ]