Re: [web2py] Subclass navbar() ?
Sorry didn't see it was answered. I apologize. On Feb 21, 2011 4:02 PM, "David J" wrote: > You only have to override the methods you want to override. > On Feb 20, 2011 11:43 PM, "pbreit" wrote: >> I can't seem to figure out the correct way to subclass navbar(). Does this > >> look close? >> >> === db.y == >> from gluon.tools import * >> >> class MyAuth(Auth): >> >> def __init__(self, environment, db): >> pass >> >> def navbar(self,prefix='Welcome',action=None): >> ... >> return bar >> >> auth = MyAuth(globals(),db) >> >>
Re: [web2py] Subclass navbar() ?
You only have to override the methods you want to override. On Feb 20, 2011 11:43 PM, "pbreit" wrote: > I can't seem to figure out the correct way to subclass navbar(). Does this > look close? > > === db.y == > from gluon.tools import * > > class MyAuth(Auth): > > def __init__(self, environment, db): > pass > > def navbar(self,prefix='Welcome',action=None): > ... > return bar > > auth = MyAuth(globals(),db) > >
[web2py] Subclass navbar() ?
I can't seem to figure out the correct way to subclass navbar(). Does this look close? === db.y == from gluon.tools import * class MyAuth(Auth): def __init__(self, environment, db): pass def navbar(self,prefix='Welcome',action=None): ... return bar auth = MyAuth(globals(),db)