[Grok-dev] Conditional grokking
Christian Klinger
cklinger at novareto.de
Mon Mar 26 12:25:31 UTC 2012
Hi,
i have the same usecase. What id do at the moment is to explicitly grok
the packages/modules in zcml. This means of course that the orignial
package has no grokking enabeld.
Maybe it's possible to use a directive for excluding modules or packages:
grok.dontregister(my.example)
grok.dontregister(my.example.Viewlets)
Christian
Sylvain Viollon schrieb:
> Hello,
>
> I would like to add a feature in martian, that would let you grok a package only if a condition is met.
>
> My idea is still vague, but I would to make possible not to grok a package (or module) if an another package is not present (a bit like zcml:condition="installed package").
>
> This could be done by triggering an exception that martian catches and skip the package (of course you will have to use this at the top of your file).
>
> What do you think of this silly idea ?
>
> Regards,
>
> Sylvain,
>
More information about the Grok-dev
mailing list