5

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?

luke.tunmer
  • 183
  • 6

2 Answers2

2

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.

Rigel Di Scala
  • 3,150
  • 2
  • 17
  • 23
1

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.

alepisa
  • 1,324
  • 8
  • 14