def render_for_experiment(page, experiment, **other_args): #TODO - headers, and general chrome/css other_args['conditions'] = generate_conditions( json.loads(experiment.conditions_json)) other_args['experiment'] = experiment other_args['earned_so_far_cents'] = cherrypy.session['earned_so_far_cents'] other_args['round'] = cherrypy.session.get('round') return env.get_template(page).render(**other_args)
def render_for_experiment(page, experiment, **other_args): #TODO - headers, and general chrome/css other_args['conditions'] = generate_conditions( json.loads(experiment.conditions_json)) other_args['experiment'] = experiment other_args['earned_so_far_cents'] = cherrypy.session['earned_so_far_cents'] other_args['round'] = cherrypy.session.get('round') return env.get_template(page).render(**other_args)
def condition_get(condition_name): conditions = generate_conditions( json.loads(cherrypy.session['experiment'].conditions_json)) return conditions.get(condition_name)
def condition_get(condition_name): conditions = generate_conditions( json.loads(cherrypy.session['experiment'].conditions_json)) return conditions.get(condition_name)