from otree.api import Currency as c, currency_range from ._builtin import Page, WaitPage from .models import Constants from datetime import datetime class Page0(Page): form_model = 'player' form_fields = ['Check_choice', 'Check_quantity'] class Page1(Page): form_model = 'player' form_fields = ['Cur_1', 'Cur_2', 'Cur_3'] class Page2(Page): form_model = 'player' form_fields = ['Sat_free_1', 'Sat_free_2', 'Sat_free_3', 'Attr_paid_1', 'Attr_paid_2', 'Attr_paid_3'] class Page3(Page): form_model = 'player' form_fields = ['Ang_1', 'Ang_2', 'Ang_3', 'Cog_1', 'Cog_2', 'Cog_3'] class Page4(Page): form_model = 'player' form_fields = ['Unc_1', 'Unc_2', 'Unc_3', 'Unc_4'] class Page5(Page): form_model = 'player' form_fields = ['Pref_i_1', 'Pref_i_2', 'Pref_i_3'] class Page6(Page): form_model = 'player' form_fields = ['Invol_1', 'Invol_2', 'Invol_3', 'Invol_4', 'Invol_5', 'Invol_6', 'Subscription'] class Page7(Page): form_model = 'player' form_fields = ['Media_expense'] class Page8(Page): form_model = 'player' form_fields = ['Sex', 'Age', 'Education', 'Occupation', 'Net_income'] class Page9(Page): form_model = 'player' form_fields = ['Feedback'] class Page10(Page): form_model = 'player' form_fields = ['Mail'] def before_next_page(self): time_now = datetime.now().time() # time object self.player.time_end = str(time_now) class Page11(Page): pass page_sequence = [ Page0, Page1, Page2, Page3, Page4, Page5, Page6, Page7, Page8, Page9, Page10, Page11 ]