if you have
auth=Auth(globals(),db)
you can do
{{=auth.login()}}
no needs to call login_form.accepts since all the processing is done
in the above line.
On Mar 17, 5:52 am, murray3 <[email protected]> wrote:
> I need to create my own views/ forms for authentication.
> The examples listed produce conflict with my layout /styles
> as they auto generate the Auth form.
>
> Is there a listing of how you could produce a custom authentication
> form in a controller? so I could just include {{=cust_Auth_form}}
> ,for example in my view, and then set my own styling etc.
>
> i.e controller:
>
> def user_login():
>
> if auth.user:
> form....logout?
> else:
> form......login?
> form..... register?
>
> return dict(=cust_Auth_form=form)
>
> view:
> {{=cust_Auth_form}}
>
> any feedback appreciated.
> Chrism
>
> On Mar 10, 9:03 pm, mdipierro <[email protected]> wrote:
>
> > So far this is wall we have but I am writing better examples for PyCon
> > and I will post them soon:
>
> >http://mdp.cti.depaul.edu/examples/default/tools#authorization
>
> > On Mar 10, 2:06 pm, Kent Borg <[email protected]> wrote:
>
> > > New user here...I bought the PDF, been reading and doing some playing,
> > > and I am liking it! Earlier today I downloaded 1.58. Thanks.
>
> > > Question: What is the best example code for understandingauth?
>
> > > The example code that was posted with an announcement for 1.56.4 lets me
> > > register, but doesn't seem to hang together to do everything it claims.
>
> > > The example in the downloaded documentation has errors in the
> > > decorators--I think. The example that starts in db.py is somewhat
> > > different again...
>
> > > I would like the whole feature set:
>
> > > - recaptcha (got the captcha to display, but my user is not being
> > > created)
> > > - e-mail verification (never get an e-mail, maybe some quiet error
> > > there is why the user was never created)
>
> > > And then, I only sort of get how the decorators work to enforce the
> > >auth-ing. (I have never used decorators before.)
>
> > > Pointers?
>
> > > Thanks,
>
> > > -kb, the Kent who is trying to be constructive in has unemployment.
>
> > > P.S. Seeing as how the manual has a Python section...it might be worth
> > > mentioning decorators in the Python portion of the manual.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py Web Framework" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---