from otree.api import ( models, widgets, BaseConstants, BaseSubsession, BaseGroup, BasePlayer, Currency as c, currency_range, ) author = 'Your name here' doc = """ Your app description """ class Constants(BaseConstants): name_in_url = 'seqPGG_PostQuestionnaire' players_per_group = None num_rounds = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): def total_payoff(self): players = self.get_players() for p in players: p.total = p.participant.vars['po_Hap'] + p.participant.vars['po_Con'] print(p.total) p.total_money = ((p.total.to_real_world_currency(self.session))/2) + 1000 class Player(BasePlayer): total = models.CurrencyField() total_money = models.CurrencyField()