/usr/lib/python2.7/dist-packages/zope.browserresource-3.12.0.egg-info/PKG-INFO is in python-zope.browserresource 3.12.0-0ubuntu2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 | Metadata-Version: 1.1
Name: zope.browserresource
Version: 3.12.0
Summary: Browser resources implementation for Zope.
Home-page: http://pypi.python.org/pypi/zope.browserresource/
Author: Zope Foundation and Contributors
Author-email: zope-dev@zope.org
License: ZPL 2.1
Description: ========
Overview
========
*This package is at present not reusable without depending on a large
chunk of the Zope Toolkit and its assumptions. It is maintained by the*
`Zope Toolkit project <http://docs.zope.org/zopetoolkit/>`_.
This package provides an implementation of browser resources. It also
provides directives for defining those resources using ZCML.
Resources are static files and directories that are served to the browser
directly from the filesystem. The most common example are images, CSS style
sheets, or JavaScript files.
Resources are be registered under a symbolic name and can later be referred to
by that name, so their usage is independent from their physical location.
You can register a single file with the `<browser:resource>` directive, and a
whole directory with the `<browser:resourceDirectory>` directive, for example
<browser:resource
file="/path/to/static.file"
name="myfile"
/>
<browser:resourceDirectory
directory="/path/to/images"
name="main-images"
/>
This causes a named adapter to be registered that adapts the request to
zope.interface.Interface (XXX why do we not use an explicit interface?),
so to later retrieve a resource, use
`zope.component.getAdapter(request, name='myfile')`.
There are two ways to traverse to a resource,
1. with the 'empty' view on a site, e. g. `http://localhost/@@/myfile`
(This is declared by zope.browserresource)
2. with the `++resource++` namespace, e. g. `http://localhost/++resource++myfile`
(This is declared by zope.traversing.namespace)
In case of resource-directories traversal simply continues through its contents,
e. g. `http://localhost/@@/main-images/subdir/sample.jpg`
Rather than putting together the URL to a resource manually, you should use
zope.traversing.browser.interfaces.IAbsoluteURL to get the URL, or for a
shorthand, call the resource object. This has an additional benefit:
If you want to serve resources from a different URL, for example
because you want to use a web server specialized in serving static files instead
of the appserver, you can register an IAbsoluteURL adapter for the site under
the name 'resource' that will be used to compute the base URLs for resources.
For example, if you register 'http://static.example.com/' as the base 'resource'
URL, the resources from the above example would yield the following absolute
URLs: http://static.example.com/@@/myfile and
http://static.example.com/@@/main-images
=======
CHANGES
=======
3.12.0 (2010-12-14)
===================
- Added ``zcml`` extra dependencies and fixed dependencies of
``configure.zcml`` on other packages' ``meta.zcml``.
- Added a test for including our own ``configure.zcml``.
3.11.0 (2010-08-13)
===================
- Support the HTTP ETag header for file resources. ETag generation can be
customized or disabled by providing an IETag multi-adapter on
(IFileResource, your-application-skin).
3.10.3 (2010-04-30)
===================
- Prefer the standard libraries doctest module to the one from zope.testing.
3.10.2 (2009-11-25)
===================
- The previous release had a broken egg, sorry.
3.10.1 (2009-11-24)
===================
- Import hooks functionality from zope.component after it was moved there from
zope.site. This lifts the dependency on zope.site and thereby, ZODB.
- Import ISite and IPossibleSite from zope.component after they were moved
there from zope.location.
3.10.0 (2009-09-25)
===================
- Add an ability to forbid publishing of some files in the resource directory,
this is done by fnmatch'ing the wildcards in the ``forbidden_names``class
attribute of ``DirectoryResource``. By default, the ``.svn`` is in that
attribute, so directories won't publish subversion system directory that can
contain private information.
3.9.0 (2009-08-27)
==================
Initial release. This package was splitted off zope.app.publisher as a part
of refactoring process.
Additional changes that are made during refactoring:
* 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.
Platform: UNKNOWN
Classifier: Environment :: Web Environment
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Zope Public License
Classifier: Programming Language :: Python
Classifier: Operating System :: OS Independent
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Framework :: Zope3
|