from otree.api import * doc = """ Demographics and thanks """ class C(BaseConstants): NAME_IN_URL = 'Outro' PLAYERS_PER_GROUP = 2 NUM_ROUNDS = 1 class Subsession(BaseSubsession): pass class Group(BaseGroup): pass class Player(BasePlayer): currency = models.CurrencyField() payoff_to_melessa_in_points = models.IntegerField() payoff_to_melessa_in_EUR = models.FloatField() # PAGES class OutroPage(Page): @staticmethod def vars_for_template(player): session = player.session participant = player.participant participant.payoff = cu(participant.receive_1) + cu(participant.receive_2) player.payoff_to_melessa_in_points = participant.receive_1 + participant.receive_2 player.payoff_to_melessa_in_EUR = (participant.receive_1 + participant.receive_2)/500 player.currency = participant.payoff.to_real_world_currency(session) page_sequence = [OutroPage]