You need to customize.

auth.settings.login_url = URL(r=request,f='usuraio', args='login')

The name of this function sounds bad in italian. LOL

Massimo

On Apr 10, 3:06 am, Álvaro Justen [Turicas] <alvarojus...@gmail.com>
wrote:
> Hello web2pyers and Massimo,
> I'm testing Auth and all work fine when I use a function called "user"
> to return auth().
> Well, I speak Portuguese and want to call it "usuario". My
> controllers' code is like to:
>
> def usuario():
>     return dict(meio=auth())
>
> In my app I want to only permit CRUD if user is logged in, so I have:
>
> @auth.requires_login()
> def dados():
>     return dict(meio=crud())
>
> But when I'm not logged in and try to 
> openhttp://localhost:8000/myapp/default/dados/web2py redirects me 
> tohttp://localhost:8000/myapp/default/user/login- that returns me to a
> 'invalid function' page.
>
> In fact, I can solve this problem creating an entry in routes.py, but
> I think this isn't the right way...
>
> Oh, with CRUD URLs I doesn't had problems - I've not tested so much,
> although CRUD doesn't have to "guess" the function like auth.
>
> --
>  Álvaro Justen
>  Peta5 - Telecomunicações e Software Livre
>  21 3021-6001 / 9898-0141
>  http://www.peta5.com.br/
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py Web Framework" group.
To post to this group, send email to web2py@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
-~----------~----~----~----~------~----~------~--~---

Reply via email to