zope的浏览器资源实现。

zope.browserresource的Python项目详细描述


浏览资源

Latest releaseSupported Python versionshttps://travis-ci.org/zopefoundation/zope.browserresource.svg?branch=masterhttps://coveralls.io/repos/github/zopefoundation/zope.browserresource/badge.svg?branch=masterDocumentation Status

注意

如果不依赖于 zope工具包的一部分及其假设。它由 Zope Toolkit project

此包提供浏览器资源的实现。它也 提供使用zcml定义这些资源的指令。

资源是服务于浏览器的静态文件和目录 直接从文件系统。最常见的例子是图片,css样式 工作表或javascript文件。

资源以符号名称注册,以后可以引用 用这个名字,所以它们的用法独立于它们的物理 地点。资源也很容易国际化。

文档位于https://zopebrowserresource.readthedocs.io

更改

4.3(2018-10-05)

4.2.1(2017-09-01)

  • 修复zcml额外项的依赖项。

4.2.0(2017-08-04)

  • 添加对Python3.5和3.6的支持。
  • 放弃对Python2.6和3.3的支持。

4.1.0(2014-12-26)

4.0.2(2014-11-04)

  • 如果没有注册适配器,则不返回ETag,禁用 3.11.0(github 1)中引入的应用程序要求

4.0.1(2013-04-03)

  • 修复一些python 3字符串与字节的问题。

4.0.0(2013-02-20)

  • 替换不推荐使用的zope.component.adapts zope.component.adapterdecorator。
  • 将不推荐的zope.interface.classprovides用法替换为等效用法 zope.interface.providerdecorator。
  • 将不推荐的zope.interface.implementsonly用法替换为等效用法 仅限zope.interface.implementer。
  • 将不推荐的zope.interface.implements用法替换为等效用法 zope.interface.implementer装饰器。
  • 放弃对Python2.4和2.5的支持。
  • 添加对Python3.3的支持。

3.12.0(2010-12-14)

  • 添加zcml额外依赖项和固定依赖项 configure.zcml在其他包'meta.zcml上。
  • 添加包含我们自己的configure.zcml的测试。

3.11.0(2010-08-13)

  • 支持文件资源的http etag头。ETag生成可以是 通过在 (iFileResource,您的应用程序皮肤)。

3.10.3(2010-04-30)

  • 与zope.testing中的模块相比,更喜欢标准库doctest模块。

3.10.2(2009-11-25)

  • 上一个版本有个破蛋,对不起。

3.10.1(2009-11-24)

  • 从中移到zope.component后从中导入hooks功能 Zope.网站。这提高了对zope.site的依赖性,从而提高了对zodb的依赖性。
  • 移动后从zope.component导入isite和ipossiblesite 从佐佩那里。地点。

3.10.0(2009-09-25)

  • 添加禁止在资源目录中发布某些文件的功能, 这是通过fnmatch'匹配forbidden_names``class attribute of ``DirectoryResource中的通配符来完成的。默认情况下,.svn在 属性,因此目录不会发布包含私人信息。

3.9.0(2009-08-27)

初次发布。此软件包作为一部分从zope.app.publisher中分离出来 重构过程。

重构过程中所做的其他更改:

  • Resource class for file resources are now selected the pluggable way. The resource directory publisher and browser:resource ZCML directive now creating file resources using factory utility lookup based on the file extension, so it’s now possible to add new resource types without introducing new ZCML directives and they will work inside resource directories as well.

    NOTE: the “resource_factories” attribute from the DirectoryResource was removed, so if you were using this attribute for changing resource classes for some file extensions, you need to migrate your code to new utility-based mechanism.

    See zope.browserresource.interfaces.IResourceFactoryFactory interface.

  • The Image resource class was removed, as they are actually simple files. To migrate, simply rename the “image” argument in browser:resource and browser:i18n-resource directives to “file”, if you don’t do this, resouces will work, but you’ll get deprecation warnings.

    If you need custom behaviour for images, you can register a resource factory utility for needed file extensions.

  • The PageTemplateResource was moved into a separate package, “zope.ptresource”, which is a plugin for this package now. Because of that, the “template” argument of browser:resource directive was deprecated and you should rename it to “file” to migrate. The PageTemplateResource will be created for “pt”, “zpt” and “html” files automatically, if zope.ptresource package is included in your configuration.

  • Fix stripping the “I” from an interface name for icon title, if no title is specified.

  • When publishing a resource via Resources view, set resource parent to an ISite object, not to current site manager.

  • Clean up code and improve test coverage.

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java无法启动应用程序:JNLP错误   java根据用户输入在PreparedStatement中使用setTime()或setNull()   java EJB与同步   java以object为键通过hashmap进行搜索   java中的模10^9+7   针对包含其他对象的对象的java OOP最佳实践   如何将字符串作为HTML代码从Java文件读取到JSP页面?   java我的POM怎么了?“解析表达式..检测到递归表达式循环”   用于Hbase的Mapreduce的java NoSuchMethodError   JAVAlang.SecurityException:权限拒绝:启动意图{act=安卓.Intent.action.MAIN cat=[安卓.Intent.category.LAUNCHER]   数组初始化谜语Java   通过arraylist搜索时的java句柄关联