python - web2py get row object from reqeust.vars -
i have folloowing code segment:
for row in rows: form(input(_type='submit',_value=row.name), _action=url('review',args=[course_id,year],vars=dict(row=row)), _method='post') where row row object. if do:
request.vars.row from called review function of type 'str' string like
<row :{'atribute name',......}> how pass row object function?
passing args causes same problem
you cannot pass entire dictionary value of single variable in query string. given row object item in query string, convert dictionary , pass query string:
url(..., vars=row.as_dict()) then in review function, access individual field values request.vars.field1, etc.
Comments
Post a Comment