Grok 在克隆产品中找到我的静态文件夹
我发现在安装了 1.2.0 Five.grok 的 Plone 安装中,我只需要在 Egg 源中有一个“static”文件夹,grok 就会适当地注册它。
当我转移到安装了 1.3.0 Five.grok 的环境时,这个静态文件夹没有注册。当然,我可以在configure.zcml 文件中显式注册它——效果很好。检查 Five.grok 的源代码,确实有与此相关的更改:类 StaticResourcesGrokker 在 Five.grok 的 1.2.0 和 1.3.0 之间从 meta.py 中删除。
我只是想了解是否有一种以“grok 方式”注册静态文件夹的新方法,或者我应该恢复到在configure.zcml 中使用显式注册?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我无法解释为什么这么方便的功能消失了。我能找到的就是这个提交差异:
http://svn.zope.org/ Five.grok/trunk/src/ Five/grok/meta.py?rev=123298&r1=112163&r2=123298
尽你所能从差异中可以看出,StaticResourcesGrokker 类在与西尔万-佐普213。 (原文如此)分支,没有给出任何评论。
在此功能恢复之前,最好手动注册静态文件夹。
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: