Re: [web2py] Subclass navbar() ?

2011-02-21 Thread David J
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() ?

2011-02-21 Thread David J
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() ?

2011-02-20 Thread pbreit
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)