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!!*
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.