[Grok-dev] static versus Zope 3's directory resources
janwijbrand at gmail.com
Mon Nov 19 07:40:48 EST 2007
Grok has built-in support for a resourcedirectory-like feature with the
There's a couple of problems with it though:
* The resources in the static directory are "published" in the
IBrowserDefault layer, and cannot be published in another layer.
* Templates in one package might want to use macros defined in
another package. If the macro refers to resources in the static
directory, the lookup fails.
Both cases are by no means disasters if you ask me, and I think we
should continue to support the static directory for the "simple" situations.
For more complex setups however, I think it might be worthwhile to have
Grok support for Zope 3's (directory)resources. This would then play
nice with other resource related libraries "out there" like
I can imagine something like:
grok.name('foo') # optional, has some sensible default
grok.layer('my_apps_layer') # optional, like with grok.View
grok.directory('foo_resources') # optional, has some sensible
What do others think?
More information about the Grok-dev