On 2007-10-05 14:30:14 +0200, "Fred Drake" <[EMAIL PROTECTED]> said:

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.

You are right, a local map would be much better.

I basically came up with the global one, because its already there. But local sounds good.

Christian Zagrodnick

gocept gmbh & co. kg  ·  forsterstrasse 29 · 06112 halle/saale
www.gocept.com · fon. +49 345 12298894 · fax. +49 345 12298891

Zope3-dev mailing list
Unsub: http://mail.zope.org/mailman/options/zope3-dev/archive%40mail-archive.com

Reply via email to