If you have
@service.run
def Set_Page ( Book, Chapter, Paragraph ): return 'check'
def call(): return service()
you can redirect to this with
redirect(URL('call',args=('run','Set_Pgae',book,chapter,paragraph)))
But I do not see why you would every redirect a user to a service. A
service is not designed to return html pages.
On Nov 28, 1:51 pm, Stef Mientki <[email protected]> wrote:
> hello,
>
> I got a simple web2py site almost running,
> and I'm trying to put it onto a server right now,
> ( I want to show it tomorrow to some people)
> but I'm stocked on a question with a probably very simple answer:
>
> I've an intro page with a login button at the top,
> this page is generated by the controller default.py : index
>
> After a succesfull log in, I want to redirect to the content of the site,
> which is a function with parameters ( service )
>
> @service.run
> def Set_Page ( Book, Chapter, Paragraph ):
>
> How can I redirect to the service "Set_Page" after a succesfull login ?
>
> In a somewhat simpeler form, I tried this (which doesn't work):
>
> def index():
> if request.vars.visitor_name :
> redirect ( URL ( 'first') )
> response.flash = T('Welcome to My First Page')
> return dict(message=T('Hello World'))
>
> def first():
> return dict ( message= 'AAP' )
>
> thanks,
> Stef Mientki