I discovered that in a Plone install, which had a 1.2.0 five.grok installed, I just had to have a "static" folder in my egg source, and grok would register it appropriately.
When I moved to an environment with a 1.3.0 five.grok installed, this static folder was not registered. I can, of course register it explicitly in the configure.zcml file - which works fine. Checking the source code of five.grok there is indeed a change related to this: the class StaticResourcesGrokker was removed from meta.py between 1.2.0 and 1.3.0 of five.grok.
I'm just trying to understand if there's a new way of having the static folder registered in the "grok way", or should I just revert to using explicit registration in the configure.zcml?
I have no explanation on why such a handy feature disappeared. All I could find was this commit diff:
http://svn.zope.org/five.grok/trunk/src/five/grok/meta.py?rev=123298&r1=112163&r2=123298
As you can see from the diff, the StaticResourcesGrokker class was obliterated during a merge with the sylvain-zope213. (sic) branch, with no comments given.
Until this functionality is restored, it is best you register the static folder manually.
Probably the answer is here:
Quote:
The ‘static’ directory is no longer automatically grokked and registered as a DirectoryResource for serving static resources. Serving static resources is being superseded by the Fanstatic library and WSGI components.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With