On Apr 9, 5:46 am, Rohan <yourbuddyro...@gmail.com> wrote:
> Hi All,
>
>   I am a newbie with web2py. Basically I want to by-pass the user's
> visit to user/login page. My home page will have the login fields like
> twitter and I am planning to collect username/email and password from
> login screen and pass it to web2py's default authentication service
> for verification. On correct login, user should be navigated to index
> page like normal. Any pointers?

One way to think of what you asked to do is this:

- an index page that requires login
- another page with a place to login, if not logged in

A simple way to do this is to add the "auth.requires_login()"
decorator to your index controller function, which will force a login
call.  There are several ways you can manage how this looks:  one is
by customizing the user.html page in views/default to be what you are
referring to as your Home Page;  another is to point auth() to get
login form / action from your more involved controller function, which
also has your home page (and login form, of course).

See more at http://www.web2py.com/book/default/section/8/1?search=login

Regards,
- Yarko
>
> Also Is there anyway to customize the look and feel of default login
> screen generated by web2py?
>
> Thanks


-- 
To unsubscribe, reply using "remove me" as the subject.

Reply via email to