oTree Forum >

Best way to handle treatments with is_displayed?

#1 by Lstott


I have an App which uses three different treatments set by admin or random.
One treatment changes the page sequence and allows a user to send a message.

I can get the treatment to show the messages inside the .HTML template using the session.treatment.

But inside the init.py for a Page
Wanted to try
if treatment == 3:
       return player.participant == 4

How do I grab the treatment variable into the page itself from session config?
Also if I need to randomize this variable, the treatment = model.Integer would be inside the subsession? 

Any suggestions would be appreciated
Thank you

Write a reply

Set forum username