Grok 在克隆产品中找到我的静态文件夹

发布于 2024-12-18 21:06:50 字数 344 浏览 1 评论 0原文

我发现在安装了 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

温折酒 2024-12-25 21:06:50

我无法解释为什么这么方便的功能消失了。我能找到的就是这个提交差异:

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.

ぺ禁宫浮华殁 2024-12-25 21:06:50

答案可能就在这里:

引用:

“静态”目录不再自动grokked并注册为DirectoryResource以提供静态资源。提供静态资源正在被 Fanstatic 库和 WSGI 组件取代。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文