Meant to send this to the list...
On 9/18/07, Christian Zagrodnick <[EMAIL PROTECTED]> wrote:
> The only thing is, no I'm not going to register every file in ZCML. I
> want to use the zc.resourcelibrary.
> The follwoing makes it possible, but it's not too nice to have that
> somewhere in the code:
> DirectoryResource.resource_factories['.js']) = (
> I'd rather have a ZCML-directive to do that. Would that fit into
I think the right approach would be to make the new directive a
sub-directive of the resourcelibrary and/or the resourcedirectory
directive. Then there could be a separate extension -> type map for
each directory of resources. An alternative would be to allow the
library or directory directive to refer to a map defined elsewhere
(say, in Python), making it easier to re-use maps.
This makes a lot of sense to me, since the provider of each pile of
resources knows what they put in it and what the processing
requirements are. A global map seems like a bad idea here.
Fred L. Drake, Jr. <fdrake at gmail.com>
"Chaos is the score upon which reality is written." --Henry Miller
Zope3-dev mailing list