[Grok-dev] Re: Recipe for "egg-like" reuse?

Sebastian Ware sebastian at urbantalk.se
Wed Apr 9 16:02:40 EDT 2008


Just tried it and it works!

I have local utilities in this application:


class ProtonCMS(grok.Application, grok.Container):
     grok.baseclass()
     interface.implements(interfaces.IProtonCMS)

     grok.local_utility(PluggableAuthentication, IAuthentication,
                        setup=setup_pau)
     grok.local_utility(role_factory(u'Manager'), IRole,
                        name='proton.Manager',
                        name_in_container='proton.Manager')

Mvh Sebastian

9 apr 2008 kl. 19.53 skrev Martijn Faassen:

> Sebastian Ware wrote:
>> 9 apr 2008 kl. 17.20 skrev Martijn Faassen:
>>>> Yes, but that's okay, isn't it? I mean the requirement should be  
>>>> that
>>>> Navicast inherits from ProtonCMS (not the other way round), which  
>>>> is the
>>>> case here.
>>>
>>> Ah, wait, I didn't read it correctly. I had assumed AddApp was the  
>>> extension to MasterApp, but it's really that MasterApp builds on  
>>> top of AddApp.
>> Since AddApp needs to inherit from grok.Application this means it  
>> is also shown in the add applications list of grok Admin. I really  
>> only want MasterApp to be in the list. Can I stop AddApp from being  
>> in the list?
>
> Try using grok.baseclass() on AddApp? I'm not 100% sure that will  
> work with local utility registrations. If it doesn't, do let us know  
> (through launchpad), as I think that'd be considered a bug.
>
> Regards,
>
> Martijn
>
> _______________________________________________
> Grok-dev mailing list
> Grok-dev at zope.org
> http://mail.zope.org/mailman/listinfo/grok-dev



More information about the Grok-dev mailing list