from otree.api import Currency as c, currency_range from ._builtin import Page, WaitPage from .models import Constants class Demographics(Page): form_model = 'player' form_fields = ['age', 'gender', 'income', 'hhincome', 'marital_status', 'children', 'education', 'height', 'weight', 'health', 'race', 'zip', 'westernized', 'country'] def vars_for_template(self): image = Constants.sil_pic return {'image': image} def before_next_page(self): self.participant.vars['age'] = self.player.age self.participant.vars['weight'] = self.player.weight self.participant.vars['height'] = self.player.height self.participant.vars['income'] = self.player.income page_sequence = [ Demographics ]