Damien Accorsi wrote:
> Diez B. Roggisch wrote:
>> Sounds a bit strange. Redirect usually preserves the protocol & host,
>> simply because it only redirects to the path.
>>
>> How exactly do you use redirect ?
> I uses it the "normal" way: I have an url which is in charge of
> validating a form, then go back to the previous page. "but"... I'll
> check tomorrow : I maybe don't use tg.url to create my redirect url.
>
> Damien
Here is the way I use redirect:
from tg import expose, flash, require, url, request, redirect, validate
[...]
@expose()
@require(predicates.has_permission('AddIpAddress'))
def add_ip_address(self, new_ip_address, new_ip_address_comment="",
came_from='/home', x=0, y=0):
[...]
redirect(came_from)
Note: the form calling this controller action is like(no 'came_from' var
defined):
<form action="/action/add_ip_address">
...
</form>
--
You received this message because you are subscribed to the Google Groups
"TurboGears" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/turbogears?hl=en.