On Wednesday, June 22, 2011 2:02:59 PM UTC-4, sheM wrote:
>
> @ Iceberg and Anthony...
>
> Thanks a lot for stopping by.
>
>
> 1. return 'nothing'
> and
> 2. raise HTTP(403, errormsg)
>
> are 2 different types of returning responses again.
>
> - the requirement we got, doesn't really en
I think pass will still return a response from web2py, but the body will be
empty (none).
On Wednesday, June 22, 2011 2:07:04 PM UTC-4, rochacbruno wrote:
> did you tried 'pass' ?
>
> def index():
>if delay_time_for_responding=='infinite':
>pass
>
> May be if the function is a web
what if pass is as last statement?
def index():
if something:
return something
elif otherthing:
return otherthing
elif delay_tima_for_responding == 'infinite':
pass
I did not tested, and I don t know if in this way web2py will redirect you
to a 'genneric' respo
Yep :) pass will actually let me, still return responses that come
after delay_time_for_responding=='infinite'.
On Jun 22, 11:07 pm, Bruno Rocha wrote:
> did you tried 'pass' ?
>
> def index():
> if delay_time_for_responding=='infinite':
> pass
>
> May be if the function is a web serv
did you tried 'pass' ?
def index():
if delay_time_for_responding=='infinite':
pass
May be if the function is a web service you could get this more easily
--
Bruno Rocha
[ About me: http://zerp.ly/rochacbruno ]
[ Aprenda a programar: http://CursoDePython.com.br ]
[ O seu aliado nos cu
@ Iceberg and Anthony...
Thanks a lot for stopping by.
1. return 'nothing'
and
2. raise HTTP(403, errormsg)
are 2 different types of returning responses again.
- the requirement we got, doesn't really encourage this :(
any other suggestions pls?
On Jun 22, 10:08 pm, Anthony wrote:
>
Also, anywhere in your code (e.g., in a model file), you can test to see if
the app should stop responding, and if so, raise the web2py HTTP error with
a 4xx or 5xx status code. For example:
if delay_time_for_responding=='infinite':
raise HTTP(403)
See http://web2py.com/book/default/chapt
What do you mean stop getting response? How about response with some
"empty" stuff? Such as:
def index():
if delay_time_for_responding=='infinite':
return 'nothing'
... # normal code starts here
Or if you really mean a response is suspended infinitely, you might
need something cal
8 matches
Mail list logo