#1 by Janina
Dear all, I wanted to set up a session in "Rooms" in order to test my experiment. Unfortunately, I cannot login and receive the error "ADMIN_PASSWORD is undefined". But I included the password both in oTree settings.py and Heroku. Moreover, I reseted the database. This is the code from otree: ADMIN_USERNAME = 'admin' ADMIN_PASSWORD = environ.get('password') I included both also in Heroku "Config Vars". I would appreciate your help very much!! Have a nice sunday! Janina
#2 by pia
Hi Janina, I have the same problem. Did you find a solution?
#3 by fabsi (edited )
Hi, What name did you use for the key in the Heroku Config Vars to set the admin password? If you use the code suggested by Janina (ADMIN_PASSWORD = environ.get('password')), the key has to be "password" and not "ADMIN_PASSWORD". Maybe that was the issue? Alternatively, you can delete the line ADMIN_PASSWORD = environ.get('password'). In the Heroku Config Vars, you can set the environment variable OTREE_ADMIN_PASSWORD instead. oTree uses this variable by default to set the admin password. Does that help?
#4 by pia
Hi, thank you so much! Now I used: OTREE_ADMIN_PASSWORD = 'xy' OTREE_ADMIN_NAME = 'admin' and it worked.