from ._builtin import Page class fact_1(Page): form_model = 'player' def vars_for_template(self): f_news_value = self.player.participant.vars['f_news'] return { 'f_news': f_news_value, 'button_text': "Next"} def is_displayed(self): return ( self.player.participant.vars['f_news'] ) # class fact_2(Page): # form_model = 'player' # template_name = "NormElicitation/fact_2.html" # # def vars_for_template(self): # f_news_value = self.player.participant.vars['f_news'] # return { # 'f_news': f_news_value, # 'title': "Fact Checked headlines (2/6)", # 'button_text': "Next"} # # # class fact_3(Page): # form_model = 'player' # template_name = "NormElicitation/fact_3.html" # # def vars_for_template(self): # f_news_value = self.player.participant.vars['f_news'] # return { # 'f_news': f_news_value, # 'title': "Fact Checked headlines (3/6)", # 'button_text': "Next"} # # # class fact_4(Page): # form_model = 'player' # template_name = "NormElicitation/fact_4.html" # # def vars_for_template(self): # f_news_value = self.player.participant.vars['f_news'] # return { # 'f_news': f_news_value, # 'title': "Fact Checked headlines (4/6)", # 'button_text': "Next"} # # # class fact_5(Page): # form_model = 'player' # template_name = "NormElicitation/fact_5.html" # # def vars_for_template(self): # f_news_value = self.player.participant.vars['f_news'] # return { # 'f_news': f_news_value, # 'title': "Fact Checked headlines (5/6)", # 'button_text': "Next"} # # # class fact_6(Page): # form_model = 'player' # template_name = "NormElicitation/fact_6.html" # # def vars_for_template(self): # f_news_value = self.player.participant.vars['f_news'] # return { # 'f_news': f_news_value, # 'title': "Fact Checked headlines (6/6", # 'button_text': "Next"} # # # # class fact_7(Page): # form_model = 'player' # template_name = "NormElicitation/fact_7.html" # # def vars_for_template(self): # f_news_value = self.player.participant.vars['f_news'] # return { # 'f_news': f_news_value, # 'title': "Fact Checked headlines", # 'button_text': "Next"} # # # class fact_8(Page): # form_model = 'player' # template_name = "NormElicitation/fact_8.html" # # def vars_for_template(self): # f_news_value = self.player.participant.vars['f_news'] # return { # 'f_news': f_news_value, # 'title': "Fact Checked headlines", # 'button_text': "Next"} page_sequence = [ fact_1 # fact_2, # fact_3, # fact_4, # fact_5, # fact_6 ]