request.args(0,default=0, cast=int, otherwise=URL(...))

PS: if it's recurrent I wonder why you aren't normalizing it already as with
try:
  arg0 = int(request.args(0))
except:
  redirect()

:P

On Wednesday, October 31, 2012 6:26:44 PM UTC+1, Annet wrote:
>
> Hi Massimo,
>
> Thanks for your reply, the cause of the problem is that in the router 
> function session[id] is based on request.args(0), whereas in 
> id=get_ID(auth,session) if session[id]: it is based on nodeID which is of 
> type int. Since my whole app is node driven, the issue of request.args(0) 
> being of type string and nodeID being of type int and having to compare 
> them is a recurring one. What is the best way to solve it?
>
>
> Kind regards,
>
> Annet
>

-- 



Reply via email to