As explained in the
docs<http://web2py.com/books/default/chapter/29/04#HTTP-and-redirect>,
redirect() is just a shortcut for raise HTTP(303, ...), which is an
exception, so control immediately moves from your app code back to the
framework (which catches exceptions and acts accordingly).
Anthony
On Sunday, June 9, 2013 5:55:53 PM UTC-4, André Kablu wrote:
>
> well, just to understand better
>
> lets say I have this:
>
> def test(var):
> if var:
> redirect('x')
> "other code"...
> return
>
> def test2():
> test(True)
> "other code 2"
>
> will test2 run "other code" or "other code2"?
>
>
> Em domingo, 9 de junho de 2013 18h53min41s UTC-3, André Kablu escreveu:
>>
>> just a question
>>
>> if I have this code:
>>
>> def test(var):
>> if var:
>> redirect('x')
>> "other code"...
>> return
>>
>> if I do test(true) will "other code" run or the function just exits?
>>
>> thanks!
>>
>
--
---
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 [email protected].
For more options, visit https://groups.google.com/groups/opt_out.