oTree Forum >

How to reverse history table?

#1 by Aroneo

Hi, everyone! I set history table in my result page using below codes. However, the table tells recent rounds' information at the botttom. I really want to put recent information on the top of the table, i.e. to reverse the sequence of rows. Is there any ways to do that? Thank you so much!

def vars_for_template(player: Player):
    return dict(me_in_all_rounds=player.in_all_rounds())

<table class="table">
    {{ for p in me_in_all_rounds }}
        <td>{{ p.round_number }}</td>
        <td>{{ p.number }}</td>
    {{ endfor }}

Write a reply

Set forum username