#Controller Functions

def form_a():
    form = SQLFORM(db.person)
    if form.process(session=None).accepted:
        session.flash = 'form accepted'
        redirect(URL('index'))
    elif form.errors:
        response.flash = 'form has errors'
    else:
        response.flash = 'please fill out the form'
    return dict(form=form)


def login_a():
     return dict(form=auth.login())

#View - form_a 

{{extend 'layout.html'}}
<h1>Register Now</h1>

<br />
{{=form}}
<br />


#View - login_a 

{{extend 'layout.html'}}
<div id="login_form">
 
Please fill the form
 
 
{{=form}}
 
</div>

Above is the code that I have in the controller and view. When I register, 
the information is saved in the db, and I am redirected to the welcome 
page. But when I try to log in, I get the "invalid login" error. Is this 
error generated because I am still logged in? 

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to