[web2py] Re: adding auth later?
Every new app comes with Auth already defined, so you would have to either comment it out or delete completely. its extremely easy to put in. On Mar 19, 4:50 am, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Basically you would need to add this to model from gluon.tools import Auth auth=Auth(globals(),db) auth.define_tables() and this to controller def user(): return dict(form=auth()) then decorate the actions as usual @auth.requires_login() You may want to customize some settings auth.settings.blablabla = 'blablabla' On Mar 18, 4:53 pm, pbreit pbreitenb...@gmail.com wrote: Dare I say it's not too difficult?
[web2py] Re: adding auth later?
If you commented out or deleted this line in layout.html, you'd never see Auth: {{try:}}{{=auth.navbar(action=URL('default','user'))}}{{except:pass}}
[web2py] Re: adding auth later?
Just check out db.py model file and delete what you dont need. On Mar 19, 9:37 pm, Pystar aitoehi...@gmail.com wrote: Every new app comes with Auth already defined, so you would have to either comment it out or delete completely. its extremely easy to put in. On Mar 19, 4:50 am, Massimo Di Pierro massimo.dipie...@gmail.com wrote: Basically you would need to add this to model from gluon.tools import Auth auth=Auth(globals(),db) auth.define_tables() and this to controller def user(): return dict(form=auth()) then decorate the actions as usual @auth.requires_login() You may want to customize some settings auth.settings.blablabla = 'blablabla' On Mar 18, 4:53 pm, pbreit pbreitenb...@gmail.com wrote: Dare I say it's not too difficult?
[web2py] Re: adding auth later?
Dare I say it's not too difficult?
[web2py] Re: adding auth later?
Basically you would need to add this to model from gluon.tools import Auth auth=Auth(globals(),db) auth.define_tables() and this to controller def user(): return dict(form=auth()) then decorate the actions as usual @auth.requires_login() You may want to customize some settings auth.settings.blablabla = 'blablabla' On Mar 18, 4:53 pm, pbreit pbreitenb...@gmail.com wrote: Dare I say it's not too difficult?