hi, i'm trying to delete session using del session, and found strange behaviour
for example *#**views/default/order.html* <table width="100%"> {{for id, qty in order.items():}} {{p=db.product(id)}} <tr> <td>{{=p.product_name}}</td> <td>Rp. {{=p.unit_price}}</td> <td><span id="{{='item%s'%p.id}}">{{=qty}}</span> {{=SPAN(A('+', callback=URL('order_callback', vars=dict(id=p.id, action='add')), target='item%s'%p.id, _title='Add Product', _class='btn btn-navbar'))}} {{=SPAN(A('-', callback=URL('order_callback', vars=dict(id=p.id, action='subtract')), target='item%s'%p.id, _title='Substract Product', _class='btn btn-navbar'))}} *{{=SPAN(A('X', callback=URL('order_callback', vars=dict(id=p.id, action='remove')), delete='tr', _title='Remove Product', _class='btn btn-navbar'))}}*</td> </tr> {{pass}} </table> * work* *#controllers/default.py* def order_callback(): id=int(request.vars.id) if request.vars.action=='add': session.order[id]=session.order.get(id, 0)+1 if request.vars.action=='subtract': session.order[id]=max(0,session.order.get(id, 0)-1) * if request.vars.action=='remove':* * del session.order[id]* * redirect(URL('product'))* return str(session.order[id]) * not work* *#controllers/default.py* def order_callback(): id=int(request.vars.id) if request.vars.action=='add': session.order[id]=session.order.get(id, 0)+1 if request.vars.action=='subtract': session.order[id]=max(0,session.order.get(id, 0)-1) * if request.vars.action=='remove':* * del session.order[id]* * session.flash=T("Order Deleted!!!")* return str(session.order[id]) * not work* *#controllers/default.py* def order_callback(): id=int(request.vars.id) if request.vars.action=='add': session.order[id]=session.order.get(id, 0)+1 if request.vars.action=='subtract': session.order[id]=max(0,session.order.get(id, 0)-1) * if request.vars.action=='remove':* * del session.order[id]* return str(session.order[id]) my question is it normal, or there is something error or lack in my code? thank you so much before -- --- 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 web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.