from ._builtin import Page, WaitPage from otree.api import Currency as c, currency_range from .models import Constants class PaymentInfo(Page): def vars_for_template(self): participant = self.participant bids = [] if 'bids' in self.participant.vars: bids = self.participant.vars['bids'] return dict(redemption_code=participant.label or participant.code, bids=bids, payoffs=payoffs, accumulated_payoff=accumulated_payoff, opponent_bids=opponent_bids, should_display_opponent_bids=True, all_bids=all_bids, all_payoffs=all_payoffs, num_rounds=self.session.config['rounds'], opponent_name=opponent_name, opponent_payoff=opponent_payoff) page_sequence = [PaymentInfo]