def handle_clear(request, basket, **kwargs):
 basket.clear_all()
 return {u'ok': True}

def handle_clear ( request , basket , ** kwargs ) : basket . clear_all ( ) return { u'ok' : True }
handle fully clearing the basket .