[web2py] Re: BestWay to call controller function

2010-02-28 Thread mdipierro
redirect(URL()) does not call another controller. sends
instructions to the client to call another controller action.

If you really need to call another controller you can do what
described here:
http://web2py.com/book/default/section/4/19

But I'd recommend do not do it. Instead, encapsulate the functionality
in a module and call functions in the module.

On Feb 28, 8:36 am, winti stefan.winterb...@gmail.com wrote:
 Hello,
 what's the best/easiest way to call a existing controller function
 from another controller in the same app?
 Until now i used:
 redirect(URL(r=request,c=..,f=...,args=.))

 In this particular case, the calling controller function is not
 associated with a form, i just like to get the return values.

 Thanks

-- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.



[web2py] Re: BestWay to call controller function

2010-02-28 Thread winti
Thanks for that.
i will use a module.

Stefan

On Feb 28, 4:45 pm, mdipierro mdipie...@cs.depaul.edu wrote:
 redirect(URL()) does not call another controller. sends
 instructions to the client to call another controller action.

 If you really need to call another controller you can do what
 described here:http://web2py.com/book/default/section/4/19

 But I'd recommend do not do it. Instead, encapsulate the functionality
 in a module and call functions in the module.

 On Feb 28, 8:36 am, winti stefan.winterb...@gmail.com wrote:

  Hello,
  what's the best/easiest way to call a existing controller function
  from another controller in the same app?
  Until now i used:
  redirect(URL(r=request,c=..,f=...,args=.))

  In this particular case, the calling controller function is not
  associated with a form, i just like to get the return values.

  Thanks

-- 
You received this message because you are subscribed to the Google Groups 
web2py-users group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.