[Grok-dev] Re: defining permissions in a module
Philipp von Weitershausen
philipp at weitershausen.de
Tue Jul 24 10:54:26 EDT 2007
On 24 Jul 2007, at 16:52 , Jan-Wijbrand Kolman wrote:
> On 7/24/07, Philipp von Weitershausen <philipp at weitershausen.de>
>> > This *does* work, but still feel ugly as in fact the permissions
>> > get registered twice. In practice this cannot really hurt, but,
>> > feels ugly :-)
>> How about allow modules to say that they depend on other modules
>> grokked first, e.g.::
>> from myapp import permissions
>> class MyView(grok.View):
> It's at least a lot cleaner than relying on double registrations of
> the permissions not to have nasty side-effects...
> Well, if the grok.depends could actually make sure the permissions
> module is not grokkked again, but I guess that *is* your intention
Well, the idea is that you only ever put one grok.define_permission()
> Martijn, what's your view on this in relation to martian?
This would obviously be a martian feature.
More information about the Grok-dev