[Zope-dev] Re: Directory resource factories
Malthe Borch
mborch at gmail.com
Sun Feb 24 09:43:39 EST 2008
Jim Fulton wrote:
> +1. Some more details would need to be worked out. For example, to work
> for your use case, it would need to be involved in search, or the
> searching rules would need to be made more powerful, so, when looking
> for some file name, it is prepared to consider files that have the file
> name as a base and use some additional extension, as in your example. I
> would love to see someone work this out. A proposal would be appreciated.
Sounds about right. There could be two cases, then:
1. A filename has some base extension
2. A filename has some base extension and
an additional extension that corresponds to
a named adapter, IResourceProvider, deriving
from IContentProvider.
The default IResourceProvider (registered for '') would simply open the
filename and return the contents.
> I recently added a hack^H^H^H^Henhancement to zc.resourcelibrary to let
> you specify a custom directory resource factory to work around this
> limitation so I could have a dynamically generated js file.
Very useful. I'll look for the changeset.
\malthe
More information about the Zope-Dev
mailing list