I'm trying to build a single function (in a controller) that generate different matplotlib graph..
So the function that generate the stream works fine:
def grafico(title='title',xlab='x',ylab='y' data=.... ):
fig=Figure()
....
return stream.getvalue()
the function that call the privious works fine but not as i want:
def graf_comp_gior():
test_id=1 # I need to set the id on the fly
print response.args # Always none why?
print response.vars #Always none why?
rows = db(db.tat.id_test==test_id).select()
tat=pd.DataFrame(rows.as_list())
.... #manupulate the data as i need
graf=grafico(........)
return graf
This is the view with the embedded graph works fine:
{{{extend 'layout.html'}}
<h1>TAT completi per l'analisi {{=variabili['anal']}}</h1>
{{=IMG(_src=URL('graf_comp_gior',args=[argomenti[0],vars=dict('id'=argomenti[0])]))}} How can i pass some data to the previous function?
Do i need to store them in a session?
Thanks!!