Dear all,
I am on the last version fo oTree (5.1.4) and is_displayed does not seem to work.
I have the following code:
class Constants:
num_rounds=10
[...]
class Belief(Page):
@staticmethod
def is_diplayed(player: Player):
print("Blah")
return ((player.round_number % (Constants.num_rounds / 2)) == 1)
form_model = 'player'
form_fields = ['belief']
[...]
page_sequence = ["Belief"]
If I know my python and otree well, which I may not, this code should print "Blah" at each round, and the page Belief should show up only in round 1 and 6. In fact it always shows up and "Blah" never prints.
(The real condition for is_displayed is intended to be more complicated, but even this simple one does not work).
Please tell me what I do wrong.
Thanks!