[web2py] Re: adding auth later?

2011-03-19 Thread Pystar
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?

2011-03-19 Thread pbreit
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?

2011-03-19 Thread Pystar
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?

2011-03-18 Thread pbreit
Dare I say it's not too difficult?

[web2py] Re: adding auth later?

2011-03-18 Thread Massimo Di Pierro
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?