[Zope3-Users] resource directory magic factory registry

Jens W. Klein jens at bluedynamics.com
Mon Mar 16 08:18:42 EDT 2009

Class zope.app.publisher.browser.directoryresource.DirectoryResource has 
a hard coded dictionary with registered resource factories for matching 
filename extensions.

Its easy to register an own type into the registry i.e. by

from zope.app.publisher.browser.directoryresource import DirectoryResource
DirectoryResource.resource_factories['.css'] = CSSResourceFactory

Is this the intended way to do this? Or should no additional registration 
happen? Or should DirectoryResource better use a different way to 
implement this (i.e. name utilities or subscription adapters)?

I started with a flavor of css variable expansion, if this is of interest 
have a look at

regards Jens
Jens W. Klein - Klein & Partner KEG - BlueDynamics Alliance

More information about the Zope3-users mailing list