pyramid_zcml-1.0.0/0000775000175000017500000000000012113677651014121 5ustar tseavertseaverpyramid_zcml-1.0.0/setup.cfg0000644000175000017500000000046012113677651015740 0ustar tseavertseaver[easy_install] zip_ok = false [nosetests] cover-package = pyramid_zcml nocapture = 1 cover-erase = 1 where = pyramid_zcml match = ^test [egg_info] tag_build = tag_date = 0 tag_svn_revision = 0 [aliases] dev = develop easy_install pyramid_zcml[testing] docs = develop easy_install pyramid_zcml[docs] pyramid_zcml-1.0.0/PKG-INFO0000664000175000017500000001334112113677651015220 0ustar tseavertseaverMetadata-Version: 1.0 Name: pyramid_zcml Version: 1.0.0 Summary: Zope Config Markup Language support for Pyramid Home-page: http://docs.pylonsproject.org Author: Chris McDonough, Agendaless Consulting Author-email: pylons-devel@googlegroups.com License: BSD-derived (http://www.repoze.org/LICENSE.txt) Description: ``pyramid_zcml`` ================ ``pyramid_zcml`` is a package which provides ZCML (Zope Configuration Markup Language) directives for all "configurator" methods available in the `Pyramid `_ web framework. See `http://docs.pylonsproject.org/projects/pyramid_zcml/dev/ `_ for detailed documentation. 1.0.0 (2013-02-28) ------------------ - Add ``setup.py docs`` alias (installs ``Sphinx`` and dependencies). - Add ``setup.py dev`` alias (runs ``setup.py develop`` plus installs ``nose`` and ``coverage``). - Add support for Python 3.2 and 3.3. - Drop support for Pyramid < 1.4. - Fix for ``xhr`` predicate behaviour: ignore when no ``xhr`` value specified. - Drop support for Python 2.5, Jython. 0.9.2 (2012-02-20) ------------------ - Stop depending on ``pyramid.config.Configurator.with_context``. Moved logic into this package in Pyramid 1.3a9+. - Respect Pyramid 1.3a9+ ``introspection`` Configurator attribute. 0.9.1 (2011-12-14) ------------------ - Readd mistakenly removed ``paste.paster_create_template`` entry point. 0.9 (2011-12-14) ---------------- - Drop dependency on PasteScript (Pyramid 1.3 compat). - Rename "paster_templates" dir to "scaffolds". - Make scaffold compatible with Pyramid 1.3a2+ (use wsgiref). - Drop scaffolding dependency on WebError. - Scaffold now uses ``pyramid#wsgiref`` server instead of ``paste#http`` server. This will require the use of Pyramid 1.0.2, 1.1.3, 1.2.5, or 1.3a2+. 0.8 (2011-12-06) ---------------- - Pyramid 1.3 compatibility. - Depend on ``zope.configuration``>=3.8.0dev in order to prevent misconfigurations involving this package and older versions of zope.configuration. z.config 3.8.0 uses dictionary-based actions (older versions used tuple-based actions). Older versions of z.config will mostly appear to work with this version of pyramid_zcml, except for cases of ZCML which uses the includeOverrides directive; to avoid any confusion caused by this, we upward-pin to 3.8.0dev+. Note that Pyramid 1.0.X, 1.1.X, 1.2.4+ and 1.3 will all still work with the combination of pyramid_zcml 0.8 + zope.configuration 3.8.0. 0.7 (2011-10-07) ---------------- - The ZCML includeOverrides directive did not work properly when ``pyramid_zcml`` 0.6 was used with Pyramid 1.2. Symptom: inappropriate ``ConfigurationConflictError`` errors. See the discussion at http://groups.google.com/group/pylons-devel/browse_thread/thread/e9720c67b8388843?hl=en for more information. 0.6 (2011-09-04) ---------------- - Fix to work under Pyramid 1.2a4 and better. - Depend explicitly on zope.configuration (upcoming releases of Pyramid will not). - Use our a local PyramidConfigurationMachine when collecting ZCML actions, and splice the locally collected actions onto the configurator context's actions when ZCML processing is done. This provides Pyramid the freedom to not rely on zope.configuration in the future, and somewhat futureproofs ``pyramid_zcml`` from changes to action processing in Pyramid. 0.5 (2011-08-24) ---------------- - Compatible with Pyramid 1.2a1. 0.4 (2011-08-17) ---------------- - Fix a unit test failure when used with Venusian 0.9. - Compatible with Pyramid 1.2dev+. 0.3 (2011-07-22) ---------------- - Add tox.ini for testing. - Pyramid 1.1 test suite fixes. 0.2 (2011-02-22) ----------------- - Add ``wild_domain`` argument to authtkauthpolicy directive. - Depend on ``pyramid>=1.0b1`` (``wild_domain`` argument to authtktauthpolicy directive). - Make tests pass on Pyramid 1.0; squash testing deprecation warnings. 0.1 (unknown) ------------- - Initial release, all ZCML directives broken out of Pyramid core. Keywords: web wsgi pylons pyramid Platform: UNKNOWN Classifier: Intended Audience :: Developers Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 2 Classifier: Programming Language :: Python :: 2.6 Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.2 Classifier: Programming Language :: Python :: 3.3 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Framework :: Pylons Classifier: Topic :: Internet :: WWW/HTTP Classifier: Topic :: Internet :: WWW/HTTP :: WSGI Classifier: License :: Repoze Public License pyramid_zcml-1.0.0/tox.ini0000664000175000017500000000104512102057141015414 0ustar tseavertseaver[tox] envlist = py26,py27,pypy,py32,py33,cover [testenv] commands = python setup.py dev python setup.py test -q [testenv:cover] basepython = python2.6 commands = python setup.py dev python setup.py nosetests --with-xunit --with-xcoverage deps = nosexcover # we separate coverage into its own testenv because a) "last run wins" wrt # cobertura jenkins reporting and b) pypy and jython can't handle any # combination of versions of coverage and nosexcover that i can find. # coverage==3.4 is required by nosexcover. pyramid_zcml-1.0.0/.gitignore0000644000175000017500000000015611736362264016112 0ustar tseavertseaverenv26/ *.egg *.egg-info *.pyc .coverage dist/ build/ .tox/ nosetests.xml pyramid_zcml/coverage.xml *$py.class pyramid_zcml-1.0.0/setup.py0000664000175000017500000000553212113673457015640 0ustar tseavertseaver############################################################################## # # Copyright (c) 2008-2011 Agendaless Consulting and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the BSD-like license at # http://www.repoze.org/LICENSE.txt. A copy of the license should accompany # this distribution. THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL # EXPRESS OR IMPLIED WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, # THE IMPLIED WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND # FITNESS FOR A PARTICULAR PURPOSE # ############################################################################## import os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) try: README = open(os.path.join(here, 'README.rst')).read() CHANGES = open(os.path.join(here, 'CHANGES.txt')).read() except IOError: README = CHANGES = '' install_requires = [ 'pyramid>=1.4dev', # various b/w compat choices 'zope.configuration>=3.8.0dev', # dict actions ] tests_require = install_requires + ['WebTest'] testing_extras = ['WebTest'] docs_extras = ['Sphinx', 'repoze.sphinx.autointerface'] setup(name='pyramid_zcml', version='1.0.0', description='Zope Config Markup Language support for Pyramid', long_description=README + '\n\n' + CHANGES, classifiers=[ "Intended Audience :: Developers", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Framework :: Pylons", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: WSGI", "License :: Repoze Public License", ], keywords='web wsgi pylons pyramid', author="Chris McDonough, Agendaless Consulting", author_email="pylons-devel@googlegroups.com", url="http://docs.pylonsproject.org", license="BSD-derived (http://www.repoze.org/LICENSE.txt)", packages=find_packages(), include_package_data=True, zip_safe=False, install_requires = install_requires, tests_require = tests_require, test_suite="pyramid_zcml", extras_require = { 'testing': testing_extras, 'docs': docs_extras, }, entry_points = """ [paste.paster_create_template] pyramid_starter_zcml=pyramid_zcml.scaffolds:StarterZCMLProjectTemplate [pyramid.scaffold] pyramid_starter_zcml=pyramid_zcml.scaffolds:StarterZCMLProjectTemplate """ ) pyramid_zcml-1.0.0/pyramid_zcml.egg-info/0000775000175000017500000000000012113677651020305 5ustar tseavertseaverpyramid_zcml-1.0.0/pyramid_zcml.egg-info/top_level.txt0000664000175000017500000000001512113677651023033 0ustar tseavertseaverpyramid_zcml pyramid_zcml-1.0.0/pyramid_zcml.egg-info/SOURCES.txt0000664000175000017500000001141612113677651022174 0ustar tseavertseaver.gitignore CHANGES.txt README.rst setup.cfg setup.py tox.ini docs/.gitignore docs/Makefile docs/api.rst docs/conf.py docs/glossary.rst docs/index.rst docs/narr.rst docs/zcml.rst docs/.static/logo_hi.gif docs/.static/repoze.css docs/zcml/aclauthorizationpolicy.rst docs/zcml/adapter.rst docs/zcml/asset.rst docs/zcml/authtktauthenticationpolicy.rst docs/zcml/configure.rst docs/zcml/default_permission.rst docs/zcml/forbidden.rst docs/zcml/include.rst docs/zcml/localenegotiator.rst docs/zcml/notfound.rst docs/zcml/remoteuserauthenticationpolicy.rst docs/zcml/renderer.rst docs/zcml/repozewho1authenticationpolicy.rst docs/zcml/route.rst docs/zcml/scan.rst docs/zcml/static.rst docs/zcml/subscriber.rst docs/zcml/translationdir.rst docs/zcml/utility.rst docs/zcml/view.rst pyramid_zcml/__init__.py pyramid_zcml/_compat.py pyramid_zcml/configure.zcml pyramid_zcml/meta.zcml pyramid_zcml.egg-info/PKG-INFO pyramid_zcml.egg-info/SOURCES.txt pyramid_zcml.egg-info/dependency_links.txt pyramid_zcml.egg-info/entry_points.txt pyramid_zcml.egg-info/not-zip-safe pyramid_zcml.egg-info/requires.txt pyramid_zcml.egg-info/top_level.txt pyramid_zcml/scaffolds/__init__.py pyramid_zcml/scaffolds/starter_zcml/CHANGES.txt_tmpl pyramid_zcml/scaffolds/starter_zcml/README.txt_tmpl pyramid_zcml/scaffolds/starter_zcml/development.ini_tmpl pyramid_zcml/scaffolds/starter_zcml/setup.cfg_tmpl pyramid_zcml/scaffolds/starter_zcml/setup.py_tmpl pyramid_zcml/scaffolds/starter_zcml/+package+/__init__.py_tmpl pyramid_zcml/scaffolds/starter_zcml/+package+/configure.zcml pyramid_zcml/scaffolds/starter_zcml/+package+/resources.py pyramid_zcml/scaffolds/starter_zcml/+package+/tests.py_tmpl pyramid_zcml/scaffolds/starter_zcml/+package+/views.py_tmpl pyramid_zcml/scaffolds/starter_zcml/+package+/static/favicon.ico pyramid_zcml/scaffolds/starter_zcml/+package+/static/footerbg.png pyramid_zcml/scaffolds/starter_zcml/+package+/static/headerbg.png pyramid_zcml/scaffolds/starter_zcml/+package+/static/ie6.css pyramid_zcml/scaffolds/starter_zcml/+package+/static/middlebg.png pyramid_zcml/scaffolds/starter_zcml/+package+/static/pylons.css pyramid_zcml/scaffolds/starter_zcml/+package+/static/pyramid-small.png pyramid_zcml/scaffolds/starter_zcml/+package+/static/pyramid.png pyramid_zcml/scaffolds/starter_zcml/+package+/static/transparent.gif pyramid_zcml/scaffolds/starter_zcml/+package+/templates/mytemplate.pt_tmpl pyramid_zcml/tests/__init__.py pyramid_zcml/tests/index.html pyramid_zcml/tests/test_integration.py pyramid_zcml/tests/test_units.py pyramid_zcml/tests/ccbugapp/__init__.py pyramid_zcml/tests/ccbugapp/configure.zcml pyramid_zcml/tests/ccbugapp/views.py pyramid_zcml/tests/defpermbugapp/__init__.py pyramid_zcml/tests/defpermbugapp/configure.zcml pyramid_zcml/tests/exceptionviewapp/__init__.py pyramid_zcml/tests/exceptionviewapp/configure.zcml pyramid_zcml/tests/exceptionviewapp/models.py pyramid_zcml/tests/exceptionviewapp/views.py pyramid_zcml/tests/fixtureapp/__init__.py pyramid_zcml/tests/fixtureapp/another.zcml pyramid_zcml/tests/fixtureapp/configure.zcml pyramid_zcml/tests/fixtureapp/models.py pyramid_zcml/tests/fixtureapp/views.py pyramid_zcml/tests/fixtureapp/subpackage/__init__.py pyramid_zcml/tests/fixtureapp/subpackage/yetanother.zcml pyramid_zcml/tests/fixtureapp/subpackage/templates/bar.pt pyramid_zcml/tests/fixtureapp/templates/fixture.pt pyramid_zcml/tests/hybridapp/__init__.py pyramid_zcml/tests/hybridapp/configure.zcml pyramid_zcml/tests/hybridapp/views.py pyramid_zcml/tests/includeoverrideapp/__init__.py pyramid_zcml/tests/includeoverrideapp/configure.zcml pyramid_zcml/tests/includeoverrideapp/views.py pyramid_zcml/tests/includeoverrideapp/sub/__init__.py pyramid_zcml/tests/includeoverrideapp/sub/overrides.zcml pyramid_zcml/tests/includeoverrideapp/sub/views.py pyramid_zcml/tests/localeapp/__init__.py pyramid_zcml/tests/localeapp/locale/GARBAGE pyramid_zcml/tests/localeapp/locale/be/LC_MESSAGES pyramid_zcml/tests/localeapp/locale/de/LC_MESSAGES/deformsite.mo pyramid_zcml/tests/localeapp/locale/de/LC_MESSAGES/deformsite.po pyramid_zcml/tests/localeapp/locale/en/LC_MESSAGES/deformsite.mo pyramid_zcml/tests/localeapp/locale/en/LC_MESSAGES/deformsite.po pyramid_zcml/tests/permbugapp/__init__.py pyramid_zcml/tests/permbugapp/configure.zcml pyramid_zcml/tests/restbugapp/__init__.py pyramid_zcml/tests/restbugapp/configure.zcml pyramid_zcml/tests/restbugapp/views.py pyramid_zcml/tests/routesapp/__init__.py pyramid_zcml/tests/routesapp/configure.zcml pyramid_zcml/tests/routesapp/models.py pyramid_zcml/tests/routesapp/views.py pyramid_zcml/tests/routesapp/templates/fixture.pt pyramid_zcml/tests/viewdecoratorapp/__init__.py pyramid_zcml/tests/viewdecoratorapp/configure.zcml pyramid_zcml/tests/viewdecoratorapp/views/__init__.py pyramid_zcml/tests/viewdecoratorapp/views/views.py pyramid_zcml/tests/viewdecoratorapp/views/templates/foo.makpyramid_zcml-1.0.0/pyramid_zcml.egg-info/PKG-INFO0000664000175000017500000001334112113677651021404 0ustar tseavertseaverMetadata-Version: 1.0 Name: pyramid-zcml Version: 1.0.0 Summary: Zope Config Markup Language support for Pyramid Home-page: http://docs.pylonsproject.org Author: Chris McDonough, Agendaless Consulting Author-email: pylons-devel@googlegroups.com License: BSD-derived (http://www.repoze.org/LICENSE.txt) Description: ``pyramid_zcml`` ================ ``pyramid_zcml`` is a package which provides ZCML (Zope Configuration Markup Language) directives for all "configurator" methods available in the `Pyramid `_ web framework. See `http://docs.pylonsproject.org/projects/pyramid_zcml/dev/ `_ for detailed documentation. 1.0.0 (2013-02-28) ------------------ - Add ``setup.py docs`` alias (installs ``Sphinx`` and dependencies). - Add ``setup.py dev`` alias (runs ``setup.py develop`` plus installs ``nose`` and ``coverage``). - Add support for Python 3.2 and 3.3. - Drop support for Pyramid < 1.4. - Fix for ``xhr`` predicate behaviour: ignore when no ``xhr`` value specified. - Drop support for Python 2.5, Jython. 0.9.2 (2012-02-20) ------------------ - Stop depending on ``pyramid.config.Configurator.with_context``. Moved logic into this package in Pyramid 1.3a9+. - Respect Pyramid 1.3a9+ ``introspection`` Configurator attribute. 0.9.1 (2011-12-14) ------------------ - Readd mistakenly removed ``paste.paster_create_template`` entry point. 0.9 (2011-12-14) ---------------- - Drop dependency on PasteScript (Pyramid 1.3 compat). - Rename "paster_templates" dir to "scaffolds". - Make scaffold compatible with Pyramid 1.3a2+ (use wsgiref). - Drop scaffolding dependency on WebError. - Scaffold now uses ``pyramid#wsgiref`` server instead of ``paste#http`` server. This will require the use of Pyramid 1.0.2, 1.1.3, 1.2.5, or 1.3a2+. 0.8 (2011-12-06) ---------------- - Pyramid 1.3 compatibility. - Depend on ``zope.configuration``>=3.8.0dev in order to prevent misconfigurations involving this package and older versions of zope.configuration. z.config 3.8.0 uses dictionary-based actions (older versions used tuple-based actions). Older versions of z.config will mostly appear to work with this version of pyramid_zcml, except for cases of ZCML which uses the includeOverrides directive; to avoid any confusion caused by this, we upward-pin to 3.8.0dev+. Note that Pyramid 1.0.X, 1.1.X, 1.2.4+ and 1.3 will all still work with the combination of pyramid_zcml 0.8 + zope.configuration 3.8.0. 0.7 (2011-10-07) ---------------- - The ZCML includeOverrides directive did not work properly when ``pyramid_zcml`` 0.6 was used with Pyramid 1.2. Symptom: inappropriate ``ConfigurationConflictError`` errors. See the discussion at http://groups.google.com/group/pylons-devel/browse_thread/thread/e9720c67b8388843?hl=en for more information. 0.6 (2011-09-04) ---------------- - Fix to work under Pyramid 1.2a4 and better. - Depend explicitly on zope.configuration (upcoming releases of Pyramid will not). - Use our a local PyramidConfigurationMachine when collecting ZCML actions, and splice the locally collected actions onto the configurator context's actions when ZCML processing is done. This provides Pyramid the freedom to not rely on zope.configuration in the future, and somewhat futureproofs ``pyramid_zcml`` from changes to action processing in Pyramid. 0.5 (2011-08-24) ---------------- - Compatible with Pyramid 1.2a1. 0.4 (2011-08-17) ---------------- - Fix a unit test failure when used with Venusian 0.9. - Compatible with Pyramid 1.2dev+. 0.3 (2011-07-22) ---------------- - Add tox.ini for testing. - Pyramid 1.1 test suite fixes. 0.2 (2011-02-22) ----------------- - Add ``wild_domain`` argument to authtkauthpolicy directive. - Depend on ``pyramid>=1.0b1`` (``wild_domain`` argument to authtktauthpolicy directive). - Make tests pass on Pyramid 1.0; squash testing deprecation warnings. 0.1 (unknown) ------------- - Initial release, all ZCML directives broken out of Pyramid core. Keywords: web wsgi pylons pyramid Platform: UNKNOWN Classifier: Intended Audience :: Developers Classifier: Programming Language :: Python Classifier: Programming Language :: Python :: 2 Classifier: Programming Language :: Python :: 2.6 Classifier: Programming Language :: Python :: 2.7 Classifier: Programming Language :: Python :: 3 Classifier: Programming Language :: Python :: 3.2 Classifier: Programming Language :: Python :: 3.3 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Framework :: Pylons Classifier: Topic :: Internet :: WWW/HTTP Classifier: Topic :: Internet :: WWW/HTTP :: WSGI Classifier: License :: Repoze Public License pyramid_zcml-1.0.0/pyramid_zcml.egg-info/dependency_links.txt0000664000175000017500000000000112113677651024353 0ustar tseavertseaver pyramid_zcml-1.0.0/pyramid_zcml.egg-info/not-zip-safe0000664000175000017500000000000112102005742022513 0ustar tseavertseaver pyramid_zcml-1.0.0/pyramid_zcml.egg-info/requires.txt0000664000175000017500000000015212113677651022703 0ustar tseavertseaverpyramid>=1.4dev zope.configuration>=3.8.0dev [docs] Sphinx repoze.sphinx.autointerface [testing] WebTestpyramid_zcml-1.0.0/pyramid_zcml.egg-info/entry_points.txt0000664000175000017500000000033712113677651023606 0ustar tseavertseaver [paste.paster_create_template] pyramid_starter_zcml=pyramid_zcml.scaffolds:StarterZCMLProjectTemplate [pyramid.scaffold] pyramid_starter_zcml=pyramid_zcml.scaffolds:StarterZCMLProjectTemplate pyramid_zcml-1.0.0/pyramid_zcml/0000775000175000017500000000000012113677651016613 5ustar tseavertseaverpyramid_zcml-1.0.0/pyramid_zcml/_compat.py0000664000175000017500000000061612102053271020572 0ustar tseavertseavertry: u = unicode except NameError: #pragma NO COVER Py3k from html import escape PY3 = True u = str def b(x, encoding='ascii'): return bytes(x, encoding) def unwrap_func(f): return getattr(f, '__func__', f) else: #pragma NO COVER Python 2 from cgi import escape PY3 = False b = str def unwrap_func(f): return getattr(f, 'im_func', f) pyramid_zcml-1.0.0/pyramid_zcml/meta.zcml0000644000175000017500000000621311656047135020427 0ustar tseavertseaver pyramid_zcml-1.0.0/pyramid_zcml/__init__.py0000664000175000017500000010146612102046263020717 0ustar tseavertseaverimport os import sys import threading from zope.configuration.fields import GlobalInterface from zope.configuration.fields import GlobalObject from zope.configuration.fields import Tokens from zope.configuration.xmlconfig import registerCommonDirectives from zope.configuration.config import ConfigurationMachine from zope.interface import Interface from zope.interface import implementedBy from zope.interface import providedBy from zope.schema import ASCIILine from zope.schema import Bool from zope.schema import Int from zope.schema import TextLine from pyramid.authentication import AuthTktAuthenticationPolicy from pyramid.authentication import RemoteUserAuthenticationPolicy from pyramid.authentication import RepozeWho1AuthenticationPolicy from pyramid.authorization import ACLAuthorizationPolicy from pyramid.config import Configurator from pyramid.exceptions import ConfigurationError from pyramid.asset import asset_spec_from_abspath from pyramid.threadlocal import get_current_registry from zope.configuration import xmlconfig from pyramid_zcml._compat import u _BLANK = u('') ###################### directives ########################## class IViewDirective(Interface): context = GlobalObject( title=u('The interface or class this view is for.'), required=False ) for_ = GlobalObject( title=u('The interface or class this view is for (alternate spelling ' 'of ``context``).'), required=False ) permission = TextLine( title=u('Permission'), description=u('The permission needed to use the view.'), required=False ) view = GlobalObject( title=_BLANK, description=u('The view function'), required=False, ) name = TextLine( title=u('The name of the view'), description=u( 'Shows up in URLs/paths. For example "foo" or "foo.html".'), required=False, ) attr = TextLine( title=u( 'The callable attribute of the view object(default is __call__)'), description=_BLANK, required=False) renderer = TextLine( title=u('The renderer asssociated with the view'), description=_BLANK, required=False) wrapper = TextLine( title = u( 'The *name* of the view that acts as a wrapper for this view.'), description = _BLANK, required=False) request_type = GlobalObject( title=u('The dotted name interface for the request type'), description=u('The view will be called if the interface represented by ' '"request_type" is implemented by the request. The ' 'default request type is pyramid.interfaces.IRequest'), required=False ) route_name = TextLine( title = u('The route that must match for this view to be used'), required = False) containment = GlobalObject( title = u('Dotted name of a containment class or interface'), required=False) request_method = TextLine( title = u('Request method name that must be matched (e.g. GET/POST)'), description = u('The view will be called if and only if the request ' 'method (``request.method``) matches this string.'), required=False) request_param = TextLine( title = u('Request parameter name that must exist in ' '``request.params`` for this view to match'), description = u('The view will be called if and only if the request ' 'parameter exists which matches this string.'), required=False) xhr = Bool( title = u('True if request has an X-Requested-With header with the ' 'value "XMLHttpRequest"'), description=u('Useful for detecting AJAX requests issued from ' 'jQuery, Protoype and other JavaScript libraries'), required=False) accept = TextLine( title = u('Mimetype(s) that must be present in "Accept" HTTP header ' 'for the view to match a request'), description=u('Accepts a mimetype match token in the form ' '"text/plain", a wildcard mimetype match token in the ' 'form "text/*" or a match-all wildcard mimetype match ' 'token in the form "*/*".'), required = False) header = TextLine( title=u('Header name/value pair in the form "name="'), description=u('Regular expression matching for header values'), required = False) path_info = TextLine( title = u('Regular expression which must match the ``PATH_INFO`` ' 'header for the view to match a request'), description=u('Accepts a regular expression.'), required = False) decorator = GlobalObject( title = u('View decorator'), required = False) mapper = GlobalObject( title = u('View mapper'), required = False) custom_predicates = Tokens( title=u( "One or more custom dotted names to custom predicate callables"), description=u('A list of dotted name references to callables that ' 'will be used as predicates for this view configuration'), required=False, value_type=GlobalObject() ) def view( _context, permission=None, for_=None, view=None, name="", request_type=None, route_name=None, request_method=None, request_param=None, containment=None, attr=None, renderer=None, wrapper=None, xhr=None, accept=None, header=None, path_info=None, traverse=None, decorator=None, mapper=None, custom_predicates=(), context=None, cacheable=True, # not used, here for b/w compat < 0.8 ): context = context or for_ config = with_context(_context) config.add_view( permission=permission, context=context, view=view, name=name, request_type=request_type, route_name=route_name, request_method=request_method, request_param=request_param, containment=containment, attr=attr, renderer=renderer, wrapper=wrapper, xhr=xhr, accept=accept, header=header, path_info=path_info, custom_predicates=custom_predicates, decorator=decorator, mapper=mapper) _view = view # for directives that take a view arg class IRouteLikeDirective(Interface): """ The interface for the ``route`` ZCML directive """ pattern = TextLine(title=u('pattern'), required=False) factory = GlobalObject(title=u('context factory'), required=False) view = GlobalObject(title=u('view'), required=False) view_context = GlobalObject(title=u('view_context'), required=False) # aliases for view_context for_ = GlobalObject(title=u('for'), required=False) view_for = GlobalObject(title=u('view_for'), required=False) view_permission = TextLine(title=u('view_permission'), required=False) # alias for view_permission permission = TextLine(title=u('permission'), required=False) view_renderer = TextLine(title=u('view_renderer'), required=False) # alias for view_renderer renderer = TextLine(title=u('renderer'), required=False) view_attr = TextLine(title=u('view_attr'), required=False) request_method = TextLine(title=u('request_method'), required=False) request_param = TextLine(title=u('request_param'), required=False) header = TextLine(title=u('header'), required=False) accept = TextLine(title=u('accept'), required=False) xhr = Bool(title=u('xhr'), required=False) path_info = TextLine(title=u('path_info'), required=False) traverse = TextLine( title=u('Traverse pattern'), description=u('A pattern which will compose a traversal path'), required = False) custom_predicates = Tokens( title=u( "One or more custom dotted names to custom predicate callables"), description=u('A list of dotted name references to callables that ' 'will be used as predicates for this view configuration'), required=False, value_type=GlobalObject() ) use_global_views = Bool(title=u('use_global_views'), required=False) class IRouteDirective(IRouteLikeDirective): name = TextLine(title=u('name'), required=True) # alias for pattern path = TextLine(title=u('path'), required=False) def route(_context, name, pattern=None, view=None, view_for=None, permission=None, factory=None, for_=None, header=None, xhr=None, accept=None, path_info=None, request_method=None, request_param=None, custom_predicates=(), view_permission=None, view_attr=None, renderer=None, view_renderer=None, view_context=None, traverse=None, use_global_views=False, path=None): """ Handle ``route`` ZCML directives """ # the strange ordering of the request kw args above is for b/w # compatibility purposes. # these are route predicates; if they do not match, the next route # in the routelist will be tried if view_context is None: view_context = view_for or for_ view_permission = view_permission or permission view_renderer = view_renderer or renderer if pattern is None: pattern = path if pattern is None: raise ConfigurationError('route directive must include a "pattern"') config = with_context(_context) if view: config.add_view( route_name=name, view=view, permission=view_permission, context=view_context, renderer=view_renderer, attr=view_attr) config.add_route( name, pattern, factory=factory, header=header, xhr=xhr, accept=accept, path_info=path_info, request_method=request_method, request_param=request_param, custom_predicates=custom_predicates, use_global_views=use_global_views, traverse=traverse, ) class ISystemViewDirective(Interface): view = GlobalObject( title=_BLANK, description=u('The view function'), required=False, ) attr = TextLine( title=u( 'The callable attribute of the view object(default is __call__)'), description=_BLANK, required=False) renderer = TextLine( title=u('The renderer asssociated with the view'), description=_BLANK, required=False) wrapper = TextLine( title = u( 'The *name* of the view that acts as a wrapper for this view.'), description = _BLANK, required=False) def notfound(_context, view=None, attr=None, renderer=None, wrapper=None): config = with_context(_context) config.set_notfound_view(view=view, attr=attr, renderer=renderer, wrapper=wrapper) def forbidden(_context, view=None, attr=None, renderer=None, wrapper=None): config = with_context(_context) config.set_forbidden_view(view=view, attr=attr, renderer=renderer, wrapper=wrapper) class IAssetDirective(Interface): """ Directive for specifying that one package may override assets from another package. """ to_override = TextLine( title=u('Override spec'), description=u('The spec of the asset to override.'), required=True) override_with = TextLine( title=u('With spec'), description=u('The spec of the asset providing the override.'), required=True) def asset(_context, to_override, override_with, _override=None): config = with_context(_context) config.override_asset(to_override, override_with, _override=_override) def set_authentication_policy(config, policy): # smooth over differences between pyramid 1.2dev and older config.set_authentication_policy(policy) class IRepozeWho1AuthenticationPolicyDirective(Interface): identifier_name = TextLine(title=u('identitfier_name'), required=False, default=u('auth_tkt')) callback = GlobalObject(title=u('callback'), required=False) def repozewho1authenticationpolicy(_context, identifier_name='auth_tkt', callback=None): policy = RepozeWho1AuthenticationPolicy(identifier_name=identifier_name, callback=callback) # authentication policies must be registered eagerly so they can # be found by the view registration machinery config = with_context(_context) set_authentication_policy(config, policy) class IRemoteUserAuthenticationPolicyDirective(Interface): environ_key = TextLine(title=u('environ_key'), required=False, default=u('REMOTE_USER')) callback = GlobalObject(title=u('callback'), required=False) def remoteuserauthenticationpolicy(_context, environ_key='REMOTE_USER', callback=None): policy = RemoteUserAuthenticationPolicy(environ_key=environ_key, callback=callback) # authentication policies must be registered eagerly so they can # be found by the view registration machinery config = with_context(_context) set_authentication_policy(config, policy) class IAuthTktAuthenticationPolicyDirective(Interface): secret = TextLine(title=u('secret'), required=True) callback = GlobalObject(title=u('callback'), required=False) cookie_name = ASCIILine(title=u('cookie_name'), required=False, default='auth_tkt') secure = Bool(title=u('secure'), required=False, default=False) include_ip = Bool(title=u('include_ip'), required=False, default=False) timeout = Int(title=u('timeout'), required=False, default=None) reissue_time = Int(title=u('reissue_time'), required=False, default=None) max_age = Int(title=u('max_age'), required=False, default=None) path = ASCIILine(title=u('path'), required=False, default='/') http_only = Bool(title=u('http_only'), required=False, default=False) wild_domain = Bool(title=u('wild_domain'), required=False, default=True) def authtktauthenticationpolicy(_context, secret, callback=None, cookie_name='auth_tkt', secure=False, include_ip=False, timeout=None, reissue_time=None, max_age=None, http_only=False, path='/', wild_domain=True): try: policy = AuthTktAuthenticationPolicy(secret, callback=callback, cookie_name=cookie_name, secure=secure, include_ip = include_ip, timeout = timeout, reissue_time = reissue_time, max_age=max_age, http_only=http_only, path=path, wild_domain=wild_domain) except ValueError as why: # pragma: no cover raise ConfigurationError(str(why)) # authentication policies must be registered eagerly so they can # be found by the view registration machinery config = with_context(_context) set_authentication_policy(config, policy) class IACLAuthorizationPolicyDirective(Interface): pass def aclauthorizationpolicy(_context): policy = ACLAuthorizationPolicy() # authorization policies must be registered eagerly so they can be # found by the view registration machinery config = with_context(_context) config.set_authorization_policy(policy) class IRendererDirective(Interface): factory = GlobalObject( title=u('IRendererFactory implementation'), required=True) name = TextLine( title=u('Token (e.g. ``json``) or filename extension (e.g. ".pt")'), required=False) def renderer(_context, factory, name=''): # renderer factories must be registered eagerly so they can be # found by the view machinery config = with_context(_context) config.add_renderer(name, factory) class IStaticDirective(Interface): name = TextLine( title=u('The URL prefix of the static view'), description=u( 'The directory will be served up for the route that starts with ' 'this prefix.'), required=True) path = TextLine( title=u('Path to the directory which contains assets'), description=u( 'May be package-relative by using a colon to separate package ' 'name and path relative to the package directory.'), required=True) cache_max_age = Int( title=u('Cache maximum age in seconds'), required=False, default=None) permission = TextLine( title=u('Permission string'), description = u('The permission string'), required = False) def static(_context, name, path, cache_max_age=3600, permission='__no_permission_required__', renderer=None): """ Handle ``static`` ZCML directives """ config = with_context(_context) config.add_static_view(name, path, cache_max_age=cache_max_age, permission=permission, renderer=renderer) class IScanDirective(Interface): package = GlobalObject( title=u('The package we would like to scan.'), required=True, ) def scan(_context, package): config = with_context(_context) config.scan(package) class ITranslationDirDirective(Interface): dir = TextLine( title=u('Add a translation directory'), required=True, ) def translationdir(_context, dir): path = path_spec(_context, dir) config = with_context(_context) config.add_translation_dirs(path) class ILocaleNegotiatorDirective(Interface): negotiator = GlobalObject( title=u('Configure a locale negotiator'), required=True, ) def localenegotiator(_context, negotiator): config = with_context(_context) config.set_locale_negotiator(negotiator) class IAdapterDirective(Interface): """ Register an adapter """ factory = Tokens( title=u('Adapter factory/factories'), description=(u( 'A list of factories (usually just one) that create ' 'the adapter instance.')), required=True, value_type=GlobalObject() ) provides = GlobalInterface( title=u('Interface the component provides'), description=(u('This attribute specifies the interface the adapter ' 'instance must provide.')), required=False, ) for_ = Tokens( title=u('Specifications to be adapted'), description=u('This should be a list of interfaces or classes'), required=False, value_type=GlobalObject( missing_value=object(), ), ) name = TextLine( title=u('Name'), description=(u('Adapters can have names.\n\n' 'This attribute allows you to specify the name for ' 'this adapter.')), required=False, ) def adapter(_context, factory, provides=None, for_=None, name=''): if for_ is None: if len(factory) == 1: for_ = getattr(factory[0], '__component_adapts__', None) if for_ is None: raise TypeError("No for argument was provided and can't " "determine what the factory adapts.") for_ = tuple(for_) if provides is None: if len(factory) == 1: p = list(implementedBy(factory[0])) if len(p) == 1: provides = p[0] if provides is None: raise TypeError("Missing 'provided' argument") # Generate a single factory from multiple factories: factories = factory if len(factories) == 1: factory = factories[0] elif len(factories) < 1: raise ValueError("No factory specified") elif len(factories) > 1 and len(for_) != 1: raise ValueError("Can't use multiple factories and multiple " "for") else: factory = _rolledUpFactory(factories) registry = _context.registry _context.action( discriminator = ('adapter', for_, provides, name), callable = registry.registerAdapter, args = (factory, for_, provides, name, _context.info), ) class ISubscriberDirective(Interface): """ Register a subscriber """ factory = GlobalObject( title=u('Subscriber factory'), description=u('A factory used to create the subscriber instance.'), required=False, ) handler = GlobalObject( title=u('Handler'), description=u('A callable object that handles events.'), required=False, ) provides = GlobalInterface( title=u('Interface the component provides'), description=u('This attribute specifies the interface the adapter ' 'instance must provide.'), required=False, ) for_ = Tokens( title=u('Interfaces or classes that this subscriber depends on'), description=u('This should be a list of interfaces or classes'), required=False, value_type=GlobalObject( missing_value = object(), ), ) def subscriber(_context, for_=None, factory=None, handler=None, provides=None): if factory is None: if handler is None: raise TypeError("No factory or handler provided") if provides is not None: raise TypeError("Cannot use handler with provides") factory = handler else: if handler is not None: raise TypeError("Cannot use handler with factory") if provides is None: raise TypeError( "You must specify a provided interface when registering " "a factory") if for_ is None: for_ = getattr(factory, '__component_adapts__', None) if for_ is None: raise TypeError("No for attribute was provided and can't " "determine what the factory (or handler) adapts.") for_ = tuple(for_) config = with_context(_context) if handler is not None: config.add_subscriber(handler, for_) else: registry = _context.registry _context.action( discriminator = None, callable = registry.registerSubscriptionAdapter, args = (factory, for_, provides, None, _context.info), ) class IUtilityDirective(Interface): """Register a utility.""" component = GlobalObject( title=u('Component to use'), description=(u('Python name of the implementation object. This ' 'must identify an object in a module using the ' 'full dotted name. If specified, the ' '``factory`` field must be left blank.')), required=False, ) factory = GlobalObject( title=u('Factory'), description=(u('Python name of a factory which can create the ' 'implementation object. This must identify an ' 'object in a module using the full dotted name. ' 'If specified, the ``component`` field must ' 'be left blank.')), required=False, ) provides = GlobalInterface( title=u('Provided interface'), description=u('Interface provided by the utility.'), required=False, ) name = TextLine( title=u('Name'), description=(u('Name of the registration. This is used by ' 'application code when locating a utility.')), required=False, ) def utility(_context, provides=None, component=None, factory=None, name=''): if factory and component: raise TypeError("Can't specify factory and component.") if provides is None: if factory: provides = list(implementedBy(factory)) else: provides = list(providedBy(component)) if len(provides) == 1: provides = provides[0] else: raise TypeError("Missing 'provides' attribute") if factory: kw = dict(factory=factory) else: # older component registries don't accept factory as a kwarg, # so if we don't need it, we don't pass it kw = {} registry = _context.registry _context.action( discriminator = ('utility', provides, name), callable = registry.registerUtility, args = (component, provides, name, _context.info), kw = kw, ) class IDefaultPermissionDirective(Interface): name = TextLine(title=u('name'), required=True) def default_permission(_context, name): """ Register a default permission name """ # the default permission must be registered eagerly so it can # be found by the view registration machinery config = with_context(_context) config.set_default_permission(name) def path_spec(context, path): # we prefer registering asset specifications over absolute # paths because these can be overridden by the asset directive. if ':' in path and not os.path.isabs(path): # it's already an asset specification return path abspath = context.path(path) if hasattr(context, 'package') and context.package: return asset_spec_from_abspath(abspath, context.package) return abspath def zcml_configure(name, package): """ Given a ZCML filename as ``name`` and a Python package as ``package`` which the filename should be relative to, load the ZCML into the current ZCML registry. """ registry = get_current_registry() configurator = Configurator(registry=registry, package=package) configurator.include(includeme) configurator.load_zcml(name) actions = configurator._ctx.actions[:] configurator.commit() return actions file_configure = zcml_configure # backwards compat (>0.8.1) def _rolledUpFactory(factories): def factory(ob): for f in factories: ob = f(ob) return ob # Store the original factory for documentation factory.factory = factories[0] return factory def with_context(context): """Obtain a configurator with 'the right' context. Returns a new Configurator instance.""" configurator = context.config_class( registry=context.registry, package=context.package, autocommit=context.autocommit, ) configurator.basepath = context.basepath configurator.includepath = context.includepath configurator.info = context.info configurator.route_prefix = context.route_prefix configurator.introspection = context.introspection return configurator def load_zcml(self, spec='configure.zcml', lock=threading.Lock()): """ Load configuration from a :term:`ZCML` file into the current configuration state. The ``spec`` argument is an absolute filename, a relative filename, or a :term:`asset specification`, defaulting to ``configure.zcml`` (relative to the package of the method's caller).""" package_name, filename = self._split_spec(spec) if package_name is None: # absolute filename package = self.package else: __import__(package_name) package = sys.modules[package_name] # To avoid breaking people's expectations of how ZCML works, we # cannot autocommit ZCML actions incrementally. If we commit actions # incrementally, configuration outcome will be controlled purely by # ZCML directive execution order, which isn't what anyone who uses # ZCML expects. So we don't autocommit each ZCML directive action # while parsing is happening, but we do make sure to commit right # after parsing if autocommit it True. context = ConfigurationMachine() context.registry = self.registry context.autocommit = False context.package = package context.route_prefix = getattr(self, 'route_prefix', None) context.introspection = getattr(self, 'introspection', True) context.config_class = self.__class__ registerCommonDirectives(context) self.manager.push({'registry':self.registry, 'request':None}) lock.acquire() try: # old_action_state will be None for Pyramid 1.0 and 1.1, but # not for 1.2 old_action_state = getattr(self.registry, 'action_state', None) if old_action_state is not None: # For Pyramid 1.2+, we need to assign a temporary action state to # the registry, because the configurator actions must populate # the context's action list (instead of the registry action # state's action list) in order for includeOverrides to work # properly. from pyramid.config import ActionState self.registry.action_state = ActionState() self.registry.action_state.actions = context.actions xmlconfig.file(filename, package, context=context, execute=False) finally: if old_action_state is not None: # if we reassigned the action state, restore the old one (1.2 only) self.registry.action_state = old_action_state lock.release() self.manager.pop() self._ctx.actions.extend(context.actions) if self.autocommit: self.commit() return self.registry # note that ``options`` is a b/w compat alias for ``settings`` and # ``Configurator`` is a testing dep inj # XXX remove? def make_app(root_factory, package=None, filename='configure.zcml', settings=None, options=None, Configurator=Configurator): """ Return a Router object, representing a fully configured Pyramid WSGI application. .. warning:: Use of this function is deprecated as of Pyramid 1.0. You should instead use a :class:`pyramid.config.Configurator` instance to perform startup configuration as shown in :ref:`configuration_narr`. ``root_factory`` must be a callable that accepts a :term:`request` object and which returns a traversal root object. The traversal root returned by the root factory is the *default* traversal root; it can be overridden on a per-view basis. ``root_factory`` may be ``None``, in which case a 'default default' traversal root is used. ``package`` is a Python :term:`package` or module representing the application's package. It is optional, defaulting to ``None``. ``package`` may be ``None``. If ``package`` is ``None``, the ``filename`` passed or the value in the ``options`` dictionary named ``configure_zcml`` must be a) absolute pathname to a :term:`ZCML` file that represents the application's configuration *or* b) a :term:`asset specification` to a :term:`ZCML` file in the form ``dotted.package.name:relative/file/path.zcml``. ``filename`` is the filesystem path to a ZCML file (optionally relative to the package path) that should be parsed to create the application registry. It defaults to ``configure.zcml``. It can also be a ;term:`asset specification` in the form ``dotted_package_name:relative/file/path.zcml``. Note that if any value for ``configure_zcml`` is passed within the ``settings`` dictionary, the value passed as ``filename`` will be ignored, replaced with the ``configure_zcml`` value. ``settings``, if used, should be a dictionary containing runtime settings (e.g. the key/value pairs in an app section of a PasteDeploy file), with each key representing the option and the key's value representing the specific option value, e.g. ``{'reload_templates':True}``. Note that the keyword parameter ``options`` is a backwards compatibility alias for the ``settings`` keyword parameter. """ settings = settings or options or {} zcml_file = settings.get('configure_zcml', filename) config = Configurator(package=package, settings=settings, root_factory=root_factory, autocommit=True) config.include(includeme) config.hook_zca() config.begin() config.load_zcml(zcml_file) config.end() return config.make_wsgi_app() # includeme function for config.include'ability def includeme(config): """ Function meant to be included via :meth:`pyramid.config.Configurator.include`, which sets up the Configurator with a ``load_zcml`` method.""" config.add_directive('load_zcml', load_zcml, action_wrap=False) pyramid_zcml-1.0.0/pyramid_zcml/scaffolds/0000775000175000017500000000000012113677651020557 5ustar tseavertseaverpyramid_zcml-1.0.0/pyramid_zcml/scaffolds/__init__.py0000664000175000017500000000034612102042547022657 0ustar tseavertseaverfrom pyramid.scaffolds import PyramidTemplate class StarterZCMLProjectTemplate(PyramidTemplate): _template_dir = 'starter_zcml' summary = 'pyramid starter project (using ZCML)' template_renderer = staticmethod(None) pyramid_zcml-1.0.0/pyramid_zcml/scaffolds/starter_zcml/0000775000175000017500000000000012113677651023270 5ustar tseavertseaverpyramid_zcml-1.0.0/pyramid_zcml/scaffolds/starter_zcml/setup.cfg_tmpl0000644000175000017500000000103511736362264026143 0ustar tseavertseaver[nosetests] match=^test nocapture=1 cover-package={{package}} with-coverage=1 cover-erase=1 [compile_catalog] directory = {{package}}/locale domain = {{project}} statistics = true [extract_messages] add_comments = TRANSLATORS: output_file = {{package}}/locale/{{project}}.pot width = 80 [init_catalog] domain = {{project}} input_file = {{package}}/locale/{{project}}.pot output_dir = {{package}}/locale [update_catalog] domain = {{project}} input_file = {{package}}/locale/{{project}}.pot output_dir = {{package}}/locale previous = true pyramid_zcml-1.0.0/pyramid_zcml/scaffolds/starter_zcml/+package+/0000775000175000017500000000000012113677651025011 5ustar tseavertseaverpyramid_zcml-1.0.0/pyramid_zcml/scaffolds/starter_zcml/+package+/resources.py0000644000175000017500000000012411736362264027371 0ustar tseavertseaverclass Root(object): def __init__(self, request): self.request = request pyramid_zcml-1.0.0/pyramid_zcml/scaffolds/starter_zcml/+package+/__init__.py_tmpl0000644000175000017500000000063611736362264030162 0ustar tseavertseaverfrom pyramid.config import Configurator from {{package}}.resources import Root def main(global_config, **settings): """ This function returns a Pyramid WSGI application. """ zcml_file = settings.get('configure_zcml', 'configure.zcml') config = Configurator(root_factory=Root, settings=settings) config.include('pyramid_zcml') config.load_zcml(zcml_file) return config.make_wsgi_app() pyramid_zcml-1.0.0/pyramid_zcml/scaffolds/starter_zcml/+package+/templates/0000775000175000017500000000000012113677651027007 5ustar tseavertseaverpyramid_zcml-1.0.0/pyramid_zcml/scaffolds/starter_zcml/+package+/templates/mytemplate.pt_tmpl0000644000175000017500000000604411736362264032574 0ustar tseavertseaver The Pyramid Web Application Development Framework
pyramid

Welcome to ${project}, an application generated by
the Pyramid web application development framework.

pyramid_zcml-1.0.0/pyramid_zcml/scaffolds/starter_zcml/+package+/views.py_tmpl0000644000175000017500000000007311736362264027553 0ustar tseavertseaverdef my_view(request): return {'project':'{{project}}'} pyramid_zcml-1.0.0/pyramid_zcml/scaffolds/starter_zcml/+package+/static/0000775000175000017500000000000012113677651026300 5ustar tseavertseaverpyramid_zcml-1.0.0/pyramid_zcml/scaffolds/starter_zcml/+package+/static/middlebg.png0000644000175000017500000000535511736362264030564 0ustar tseavertseaver‰PNG  IHDR¬º—ƹ CiCCPICC Profilex–wTSYÀï{/½ÐB‘z MJ‘z‘^E%$B °WDWiŠ"‹".¸ºY+¢XX°/È" ¬‹«ˆŠe_ôeÿØý¾³óǜߛ;sïÜ™¹ç<(¾BQ&¬@†H"óñ`ÆÄÆ1ñÝD€ÖpyÙYAáÞ?/3u’±L Ïúuÿ¸Åò a2?›þ¥ÈËKÐBй|A6å<”Ós%Y2û$ÊôÄ4ËÑQV•qò6ÿìó…ÝdÌÏñQYÎYü ¾Œ;PÞ’# Œ¢œŸ#ä¢|eýti†å7(Ó3Ül0™]"ॠl…2EÆAyJò,NœÅÁ24O8™YËÅÂä Ó˜g´vtd3}¹é‰„Âå¥qÅ|&'3#‹+ZÀ—;Ë¢€’¬¶L´ÈöÖŽöö, ´ü_å_¿zý;ÈzûÅãeèçžAŒ®o¶o±ßl™Õ°§ÐÚìøfK, eª÷¾Ùô Ÿ@óY÷aÈæ%E"Ér²´ÌÍ͵ x²‚~•ÿéðÕóŸaÖy²ó¾ÖŽé)HâJÓ%LYQy™é™R13;‹Ë0Ybtëÿ8+­Yy˜‡ ’b=* 2¡(m·ˆ/”3EL¡èŸ:üÃfå Ã/s­æ# /± 7èù½ `hd€ÄïGW ¯} $FÙË‹Öý2÷(£ëŸõß\„~ÂÙÂd¦ÌÌ ‹`ò¤â£oB¦°€ä¨- Œ Øà Ü€ðÁ ĂŀR@ƒ\° ¬ù ì{@9¨5 4€ œÀepÜ}à>#à˜¯Á Axˆ Ñ 5H2€Ì ˆ ͇¼ @( Š… dHI¡UÐF¨*†Ê¡ƒPô#t º]…z »Ð4ý ½ƒ˜ÓaMض„Ù°;GÀ‹àdx)¼΃·Ã¥p5| n†/À×á>x~O!!# Da!l„ƒ#qH"FÖ H R4 mH'r D&·††abXgŒ/&ÃÃ,ŬÁlÔcŽ`š1˜[˜!Ì$æ#–ŠÕÀša°~Øl26›-ÁÖb›°—°}ØìkÇÀáp¾¸X\*n%nn®w׃ÆMáñx5¼ÞŒçâ%ø||þþ¾?‚C ´ 6oBADØ@(!%œ%ôF 3D¢щLä—‹ˆ5Ä6â âq†¤H2"¹"H©¤õ¤RRééé%™LÖ%;’CÉBò:r)ù8ù yˆü–¢D1¥p(ñ)e;å0å<å.å%•J5¤ºQã¨êvjõ"õõMÎBÎOŽ/·V®B®Y®W›¦°©iŠi…é 3ØÌÞLh¶Ï¬Çkîh.2¯6`QXî¬V=kÈ‚ah±Á¢Åâ¹¥¾eœåNËNËVvVéV5V÷­•¬ý­7X·Yÿicjó©°¹=—:×{îÚ¹­s_ØšÙ l÷ÛÞ±£ÙÙm¶k·û`ï`/¶o°wÐwHp¨t`ÓÙ!ìmì+ŽXGÇµŽ§ß:Ù;IœN8ýáÌrNs>ê<6Ïhž`^ͼa]®ËA—ÁùÌù óÌtÕqåºV»>vÓsã»Õºº›¸§ºsîaå!öhò˜æ8qVsÎ{"ž>žžÝ^J^‘^å^¼u½“½ë½'}ì|Vúœ÷ÅúøîôðÓôãùÕùMú;ø¯öï „”<4 ¶ÁAþA»‚,0X ZÐ ‚ý‚w? 1 Yòs(.4$´"ôI˜uت°ÎpZø’ð£á¯#<"Š"îGGJ#Û£ä£â£ê¢¦£=£‹£c,cVÇ\UƶÆáã¢âjã¦z-ܳp$Þ.>?¾‘Ñ¢e‹®.V_œ¾øÌù%Ü%'° Ñ GÞsƒ¹ÕÜ©D¿ÄÊÄI‡·—÷ŒïÆßÍ¸Š£I.IÅIcÉ.É»’ÇS\SJR&„a¹ðEªojUêtZpÚá´OéÑ鄌„ŒS"%Qš¨#S+sYfO–YV~ÖàR§¥{–NŠĵÙPö¢ìV ý™ê’K7I‡ræçTä¼ÉÊ=¹Lq™hY×rÓå[—®ð^ñýJÌJÞÊöU:«Ö¯Zí¾úàhMâšöµzkóÖŽ¬óYwd=i}Úú_6Xm(Þðjcôƶ<ͼuyÛ|6ÕçËå‹ó6;o®Ú‚Ù"ÜÒ½uîÖ²­ ø× ­ K ßoãm»öõw¥ß}Úž´½»È¾hÿÜÑŽþ®;+¯(Þ´«y7swÁîW{–ì¹Zb[Rµ—´Wºw°4°´µL¿lGÙûò”ò¾ ŠÆJÊ­•Óûøûz÷»ío¨Ò¬*¬zw@xàÎAŸƒÍÕ†Õ%‡p‡r=©‰ªéüžý}]­zmaí‡Ã¢ÃƒGÂŽtÔ9ÔÕÕ8ZT×KëÇÅ»ùƒç­ ¬†ƒŒÆÂãà¸ôøÓ~ì?p¢ý$ûdÃO?U6Ñš š¡æåÍ“-)-ƒ­±­=§üOµ·9·5ýlñóáÓ:§+Î(Ÿ):K:›wöÓ¹ç¦ÎgŸ¸|a¸}Iûý‹1ow„vt_ ¸tå²÷å‹î箸\9}Õéê©kìk-×í¯7wÙu5ýb÷KS·}wó ‡­7o¶õÌë9ÛëÚ{á–ç­Ë·ýn_ï[Ð×ÓÙg ~`ðÿÎØÝô»/îåÜ›¹¿îöAÁC…‡%4Uÿjòkã ýà™!Ï¡®Çáïó†Ÿý–ýÛû‘¼'Ô'%£Ú£uc6c§Ç½Ço>]øtäYÖ³™‰ü߯|nüü§?Üþ蚌™y!~ñéÏm/Õ^~eûª}*dêÑëŒ×3ÓoÔÞyË~Ûù.úÝèLî{üûÒ&Ú>||ð)ãÓ§¿›óüìÎçŠ pHYs  šœPIDAT(cøøñã& €ÿÿÿ‡²H#SØ4½ø¹8]E„¶A¢ÍTô¶àÄ&†ÍDˆaSB¬ë±9§%Hr3NÏ $,Â&…¨½´›IEND®B`‚pyramid_zcml-1.0.0/pyramid_zcml/scaffolds/starter_zcml/+package+/static/pylons.css0000644000175000017500000001043411736362264030337 0ustar tseavertseaverhtml,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,font,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td{margin:0;padding:0;border:0;outline:0;font-size:100%;/* 16px */ vertical-align:baseline;background:transparent;} body{line-height:1;} ol,ul{list-style:none;} blockquote,q{quotes:none;} blockquote:before,blockquote:after,q:before,q:after{content:'';content:none;} :focus{outline:0;} ins{text-decoration:none;} del{text-decoration:line-through;} table{border-collapse:collapse;border-spacing:0;} sub{vertical-align:sub;font-size:smaller;line-height:normal;} sup{vertical-align:super;font-size:smaller;line-height:normal;} ul,menu,dir{display:block;list-style-type:disc;margin:1em 0;padding-left:40px;} ol{display:block;list-style-type:decimal-leading-zero;margin:1em 0;padding-left:40px;} li{display:list-item;} ul ul,ul ol,ul dir,ul menu,ul dl,ol ul,ol ol,ol dir,ol menu,ol dl,dir ul,dir ol,dir dir,dir menu,dir dl,menu ul,menu ol,menu dir,menu menu,menu dl,dl ul,dl ol,dl dir,dl menu,dl dl{margin-top:0;margin-bottom:0;} ol ul,ul ul,menu ul,dir ul,ol menu,ul menu,menu menu,dir menu,ol dir,ul dir,menu dir,dir dir{list-style-type:circle;} ol ol ul,ol ul ul,ol menu ul,ol dir ul,ol ol menu,ol ul menu,ol menu menu,ol dir menu,ol ol dir,ol ul dir,ol menu dir,ol dir dir,ul ol ul,ul ul ul,ul menu ul,ul dir ul,ul ol menu,ul ul menu,ul menu menu,ul dir menu,ul ol dir,ul ul dir,ul menu dir,ul dir dir,menu ol ul,menu ul ul,menu menu ul,menu dir ul,menu ol menu,menu ul menu,menu menu menu,menu dir menu,menu ol dir,menu ul dir,menu menu dir,menu dir dir,dir ol ul,dir ul ul,dir menu ul,dir dir ul,dir ol menu,dir ul menu,dir menu menu,dir dir menu,dir ol dir,dir ul dir,dir menu dir,dir dir dir{list-style-type:square;} .hidden{display:none;} p{line-height:1.5em;} h1{font-size:1.75em;line-height:1.7em;font-family:helvetica,verdana;} h2{font-size:1.5em;line-height:1.7em;font-family:helvetica,verdana;} h3{font-size:1.25em;line-height:1.7em;font-family:helvetica,verdana;} h4{font-size:1em;line-height:1.7em;font-family:helvetica,verdana;} html,body{width:100%;height:100%;} body{margin:0;padding:0;background-color:#ffffff;position:relative;font:16px/24px "Nobile","Lucida Grande",Lucida,Verdana,sans-serif;} a{color:#1b61d6;text-decoration:none;} a:hover{color:#e88f00;text-decoration:underline;} body h1, body h2, body h3, body h4, body h5, body h6{font-family:"Neuton","Lucida Grande",Lucida,Verdana,sans-serif;font-weight:normal;color:#373839;font-style:normal;} #wrap{min-height:100%;} #header,#footer{width:100%;color:#ffffff;height:40px;position:absolute;text-align:center;line-height:40px;overflow:hidden;font-size:12px;vertical-align:middle;} #header{background:#000000;top:0;font-size:14px;} #footer{bottom:0;background:#000000 url(footerbg.png) repeat-x 0 top;position:relative;margin-top:-40px;clear:both;} .header,.footer{width:750px;margin-right:auto;margin-left:auto;} .wrapper{width:100%} #top,#top-small,#bottom{width:100%;} #top{color:#000000;height:230px;background:#ffffff url(headerbg.png) repeat-x 0 top;position:relative;} #top-small{color:#000000;height:60px;background:#ffffff url(headerbg.png) repeat-x 0 top;position:relative;} #bottom{color:#222;background-color:#ffffff;} .top,.top-small,.middle,.bottom{width:750px;margin-right:auto;margin-left:auto;} .top{padding-top:40px;} .top-small{padding-top:10px;} #middle{width:100%;height:100px;background:url(middlebg.png) repeat-x;border-top:2px solid #ffffff;border-bottom:2px solid #b2b2b2;} .app-welcome{margin-top:25px;} .app-name{color:#000000;font-weight:bold;} .bottom{padding-top:50px;} #left{width:350px;float:left;padding-right:25px;} #right{width:350px;float:right;padding-left:25px;} .align-left{text-align:left;} .align-right{text-align:right;} .align-center{text-align:center;} ul.links{margin:0;padding:0;} ul.links li{list-style-type:none;font-size:14px;} form{border-style:none;} fieldset{border-style:none;} input{color:#222;border:1px solid #ccc;font-family:sans-serif;font-size:12px;line-height:16px;} input[type=text],input[type=password]{width:205px;} input[type=submit]{background-color:#ddd;font-weight:bold;} /*Opera Fix*/ body:before{content:"";height:100%;float:left;width:0;margin-top:-32767px;} pyramid_zcml-1.0.0/pyramid_zcml/scaffolds/starter_zcml/+package+/static/pyramid-small.png0000644000175000017500000001560411736362264031566 0ustar tseavertseaver‰PNG  IHDRÜ27µsKIDATxœí{˜Õ÷?çTU_æ>0ÃÜp„ŠD(ÞˆšhVØ,."»hbÜUß}³kÖ˜¼‰˜ˆ»„}ˆó¬1’Å Äý0sÙ™°íÛ„ilÛÎe·Yá8yIkkûÅÀÚS=ž!|ú‘3ÂM™2%lãLU6(ÇùDm9®p”"³œÌ(¶Efa.¥’6\Åá†äŒp0,d;#lÁ'òH:J H CÒÞÇ02Iôd]ZŸÂWì(gì€4„Ó¥À?Åèé¿ùŽ]Ü|›àù\ ,g„Êr‚*'¢N*<òxéîŽs×-—pVþFîÌA ÙCx)ï<Òy'2 :GåŸÀ ü°€¿ÆU@!tÞlÞ~ ´°3 pp!ð$ðǶ栟‡"•pïsÀ€CÀ†ösÂÈ¡ ׅ턲xiDF¡®&¨ô]ëìŽ3ãÒÑÌ›y>Öá5Ì»Zò‹W È )"y~z[‚äQá#¢Ð»Ž°Š[ü¨è£^#ð°| !¸ øw7ÿ9àR kí(÷¼B šv¬ 8þŒ–rÛ2Ø §NÇq~#|*±Ÿ¬ãQ)w¨«-áþ;'aÒI¼[ð÷×·°iW˜?n1´A'ÈàyÑÿ ýÜîG?«œyñrJ8”Êê¼H?iDâ´PÐäŸîºˆª2I¬³ åHò’n>ÎKÊ8Ö¦!ídÜ Met‘èã$`#°8­l!pšdÃÝýÕÀ®“Õé§ «€ï¢Uô:©Ÿãî6]ú :d®:êêòø¦'¿”)$†ÔI ‰”Ú¢“‘ØÚÜù7ã˜òÙâm º@YÄ¢ÔU:üãM],Ó41M Ë2±,ËMX@ ‘‚ Ë:Yk8³-"ø/à{n¾˜y2:û”¢X€¶±Þ8µCäÔ†ð—x:ãæ}RÈ'á¢QÅ5Ó«¸ùújâ](倊!”ä‹J®šàÐôyÁò5‚Ád[Bÿç 3‘Ü÷õ§ð ÃýÀKh½8Ï-@pÜÔ—Zc‘T±¼7³ ù ã$£$Unj"Ú©BK\´ûúè[ºý¨´~*j´$Ú Ä2œ[áÖ‰¢m¥Þl2ÿõô瞘À(´—±­9Ä8VUdAÎ$œ‡„ä1MÌDÞ hi¤%Q€` €”cÎ.æ¾[ë0T åDAÅ@Ùhs( *;–Ï-W+.9/€4B„BAB¡¡Pˆp(D(&‡ ‡CÉ”&‘ƒçÓt¸yÏN OëÑ^̪^Ο¼ãÖ½ßW~6Úíý.0ÈC«µ€ßS|uÇ»åÝ:ÞCKáK{éÿónß«Ð/:àhßïÝck/øÎ©E«…ï»ã[öØÞÜK?ån ©d‚Üâö¹ÁmÿOÀ:·}ÅiJºœI¸®®.By…zU—I)¤“ôåµ$Ï’üÃWë(+5ˆEõ‹U @Ù(Bèû.‰c0wÏ<ô\˜Ö0 é“jÚn“R‚ÀuܤØö K7€2ôD8èÝ´£åFwÿ:àçYΟ&Àƒ¾r‰&cMØ»ù¾ã–»À"·ØY£¿®D»Ò_Îи--§cÐ/‘(Žo½à¶µxh@K¿n·Î…À³èøØO3ôp¯³íAÌ„°{î-¾²f÷?ç¶ÿS´$>íCÂ4$á~ÁûÉ%¤&‡ô•Åm˜?³Œ có‰wÛ>w•a¢dGJÀ ¦$5e‚¯]àg¯0M‘ôˆ¦lÜr¡ çÄAõ7héZ"xx¸=碥Fú€ÂèI ðZzˆ¢'tM´Ùh/>FK2ÐoûçÑRu'šð!’®ø à_ÑRèXÚÚÝ­‰žÌÀ{€•nÙW€oºc]„&b-ðÀ¢oý_ÿÏísðŠ;?Iu9a~H’loßGKi&ôCÀh•ô´CNm8SJòóóQ(—\®Äq&š|‚X¦_Ϭ«†aÇHPàDAuC¼:÷ãÄÚô>1Šna0¹\°iT9O¯-¦¤P«–yyyäå… ‡B˜–…ÿc×h,“Ù1 db®DOÆ{Ýý?¯ùŽo~̦¢Õ¾ô7û…Àùnþy’“’vŽ7¡ß¾Œ~ã§ã?2”Å€_£¥ãOÑiÚæôóÛÂh"ÍJ«ó-´:øUà³nÙͤÆ¢_,¢íÇ™À’ cê £ÉZ5þpÔwü5´:º ¸èÛÎ rªR†AAA>Ji/¥!µÄѤ8JRQä֙ŧ 'v køa°£œã`·c·´ â¸î}´àÐmÀ_6ÀËkjùŸwBäA¡`‚‚JKK1b•” î滑Æ¡WIA«rõÀ ´ªÚ9qI—´‡¥è FOÂtÂ} ­;wÐsù‘ßV‰¡%J&²õ…U$%ÞzÎoý:ÃqÐÒùw¬o+2ÔY†–Œ…èɉâ«hõÖF‡Žf¨sMîœ,Õ:Qä”p¦iR\\Œã(M0‰K:‰eš!‰Åº˜÷ùc«Dìû (×ß ´ú®ï$†–!.Ù”Û†°?øë=ÌyìZ"6í´··ÓÜÜLãæF‚ eeeÔÔTŸ,)7½) -ÅîG;ÒñÚ›Xü5ÚéáÅŸBhÂv4fhÛǤª«½¡ý‚¨GK›*’o²>Îým–òÝè—I)Z•Íä´øØ&\_«sÒ"éØÙ‚vdûîXŠz©sJ[ÂY&%%%8¶:îf¹*^KK ï°™[¯ÙM}É¢‘ˆJmL9¨x’pB¸«T\òuÇ¡®|y;w.«G!É€mÛ477³¿¹™x|À„óOª½h±­‚BÛ\¯oõÒÆqô*”ïç‡B¡©kQTT49‰Œ(**ZÞÚÚ I 1}úôð[o½%”R˜¦¹?‹¹7,#„eYÅãñ»Ð^njĒRJÛ¶¥Âoù¯³=ý]$í®löW”¤·6Û8³aI’~HïAñn7vÈéJ+`QZZ‚m;˜¦‰aìÙ³‡õë×óç¶ñÅ©qæ^! €ö8_…a$q¤ vâ K!=Ò è´áÚ±ðw—·ð“Õ•„ƒ*ÕQC2‹FûíBVJy±"ãöÛo/xê©§„ã8äåå½ßÞÞþ÷ÍÍÍp8l{±+ íy3}Ép“ ˜Ë–-;úµ¯}­;‹îCO,9~üøÙo¿ý¶QPPptݺu…hÇJâJ}ôÑ’3f„ººº¨«««B;g2EΜ9órÇqn¡P¨«®®îƒúúú=ÕÕÕÇÚÛÛ+V¬¸!‹'NœØÌQJż¶¾ûÝï6,X°€ë®»nüÊ•+g ÉG«²öO~ò“a÷ÜsiÛ6åååE---gùöOÜ[Ì›ÛòÉ ø–u¹a˜+ ”*GÛAôà ¦% ýÀ-/Ýwß}…¿üå/ó#‘£F Ì®¬¬ôŒÂô‡îßO™LóçÏ<òÈ–ÆÆÆñ;wîœÚÔÔô?Ѧ¦¦K.¸à‚??ÞB«bÞùÂ4Ͱ·HÀ0 m¦;oŒGyäÜ—^zižã8Œ3æ£'Ÿ|rÅå—_ÞŠûzÚ¼y³õ«_ýêºX, ‡Ã^ˆÁ›üƈ#ª½ÆjkkkÐö—w\râĉE–eY¶msî¹çŽF{L=Ò*Àž3g<ð@éáÇ©ªª*ß·oßL·N7ÐýôÓO}å+_1lÛ¦¸¸¸àرcUî±ØÅ_l¾ûî»Þµy÷!NK%ä˜p¡`ˆa¥ÃXµj+_y…ÖcdžI~ždñ½6UÝЭ0Œ6Ž·Ei9;÷±«¥‚ãñQXã(¯¾€Q]€yI€[7òûèÞûGÂ]pV~+£J5 ó `€aÀÿr7óžj ù¸‰e$%›”Û¶©®ªªFÇÃ|2²TÚ˲‚ÂñBÏ18ƒ9kÖ¬w.\8þøñãÅK—.]__ôСC#¤”ö¼yóÞuÛõ·-ðM,¥Å†M†É¶lÙ²KÇ!G–.]úÜ´iÓ"$ #Ž;–ˆþ;Žã¸Ç„r'!ylý¹~”Ti$mÛöëåÞêïå#Ca†!B¡P½J$ÑFCCC¡GÚººº³Ð×(`¯X±Âœ0aB<‰PPP0¹±±qFMMM­¢v¢UÚ. »¾¾~øÖ­[½0ÌiÏ)á"‘O>ù$o®[ç®›4±Å?ÞjpNíqÞú}ˆÍE4·Uc„ÏeDÍxªÎ=ŸË¯:›êš* óSÕþ‹'}ø[:£°¿ùû÷î¢i÷G¼½kÑ)ÛY¸›1åðÀuøÖ‹µØŽp=¤Ú;ª”ðTR…ž$ý ˜ Û¶mw¢cÛ¶·ìi oWçî»ïþð‰'žh>räHåo~ó›q›6m:¨”ÕÕÕ»n¿ýömô\=!DZ=õ, áľ}ûÌŒ6lXË´iÓ§µc´´´Xñx<‰G ¹m½:@@‚éäWJ©LäOyùH)½c¸õ£¾±Û¶ƒi×ãõkÔÕÕ‰ššš=åuË—/¿æ›ßüfIò'^cÆŒ¹rëÖ­ùeeeE<MÌn·Ž§æ:îõæ 9#\Ie%ï½ÿñxÓÔÝÚŽƒ)b<óëc¬Þ0‰Ë®šÅ¤K§ñűc>¬ ßm‡pÎÈ ÎYS?ÜJ¤#ÆÖ­ÛøÓ{ï²|í*>n\K@Dé6ò0¤V-…”H¥PN<}` ”R‰ Õ›„骫«™4iÒV­Zõ¥ÆÆÆqÛ·oï˜:uêz˲¼ñeퟤtM!\ ˆI)€¶¶¶Â––9bÄïÅ gÑ¢E—z„s_)dqI¦Ü>3Îñ% )QJ ¡p'ç¶íÒ»f¯Ž1sæÌ7/rG.^¼xæœ9sÖÖÖúíDV¬X1bíÚµó¼>ƒÁ`:Fè‘-%¹¶j‚€ 2 sF¸cÍÇœ²ò"ýC¬Ž“X¼W»óÙ¾¿‰ ü˜Â¢§(/+㬳΢¡¡††FMMM eeeX–•Ò®mÛ=z„ææìرƒmÛ¶±uë6öíû˜Ã‡ÐÖÞN4'f—0%–¡5Fá~­ ¤ÂQŽ7ÉNáuûí·¿³f͚Ϸµµ•ƒÁ¶¯ýëëIÚBéý'ÊôïÙYY™ª««k:|øpukkkùœ9s¾´lÙ²ÿ.//·×¯__ðï|çêµk×^#„PJ)F ’݃\÷¤]õ6‹´MW¯ÝωS…[&üª+É ¾÷\â .üà /¼°¾©©iòþýûÏ4iÒ?Í;÷…/|á ÛºººÔsÏ=7îå—_¾9‹ ·E"‘Ññx\’$˜§*§ýâñ4¡”b°H7(„Súï„Ð+ Š€â+VŒ¹çÞÿkÚ¶üM€’pPûö£±(‡¦å@ lü3+W¾Œ”’P(Dqq1UU•ÔÖÖRWW‡eYìÚ½›÷îåÀ´¶§;ÚR`¦e%<¡†!±,3é™ô–’I‰£Ç„sǶmÛ°m[2p•€Ù³güàƒnܼyód€úúú÷/»ì²#dVsE<·Çé«çÁ|iÞ¼yãÛÛÛ‡½ñÆ_<ï¼ó&‡Ãá¶£GVÄb±ð¤I“VïÙ³ç쌎D"y¤®»»;q_âñ8î1ÿ˜„mÛŽ7–X,&HµqÇ(¼ûå!eâ»m˜nÞõxu ž}öÙŸÍš5+oß¾}çµ´´4,Y²ä[?þx»ã8†mÛ!!Dlîܹß[·nÝ‘Hdt4õIŽo›ž÷ۜ괖pJ© z`¡›ŠÜF{÷ À>|øp@H©?PH,,Ö;©.{76—táC{G[š¶Ò¸y Ê•Ò00Mýí›aš¾u’Þâe\{M¦Í#œr{`„ …BÝ•••[#‘HiUUÕ>!᫦¦fÏæÍ›'K)ã·ÜrËëøÔ¥ôþóòòºªªª¶tvvTWWïÎÖÿÌ™3÷?öØc>üðÃ7îÝ»÷3‘H¤¬½½½xøðữ¾úêÕÏ>ûìÚ+®¸b¶ã8”””"Õ¶r†1bD ÊËË»ÇS$\QQQguuõ–ŽŽŽ‚ÊÊÊýn”±H)©ªªÚnšfgUU•÷)M¢üüüÎÊÊÊ-]]]ù•••“êåT€š|ôèÑ‘#GŽÜ°k×®GûÓ ô/õÚk¯ kjj*ª¨¨è¸æškƒv>Šh4*ÂápÒzýd:–^Ç0 2Ž¥:*JÛ¶q¯ÇëK‘Û·o7V­Z5¼µµÕ;vì¡n¸á š@ÑX,fwtt8¦iÆòóóÝ·ÄHÆýêeBuM øŸtd•p®Zh‘T Ð’,ä–ëoc4¡l´Qêíû€¨­­mµLëx4Ë—=ˆÖ“@é_ϳ¨õP„Éã25ï'\*Ù¼2½oÑh„â’â ýœè‚‰¬0nºé¦/=zt¤+Ý^ìϘN´ÿk¯½¶åÚk¯=HÚä5 ‚x?Ÿ ŽÊp<= ã'œ¨sÎ9ǹãŽ;"$½Ëžªk[–/..N'U6©Ö#ä3XHN)å-T  UAO%´H®ðts…[!± *‘2®¡¡Á.--iÚßÜ\•bOùåÿb@¥ÌGL™~®¿<-Ÿ$o²=Ó09~¼•˦Oû€Ìމ\@òú믿výúõÐÐа桇úà'×È6É{#\‚tô´ËÒ¥V62§ª¤Ó%šG*oëý>‡§§§_¤G8oëOôüxyãÊ+¯|mÙ²§§ç…ót°8Eí“Y÷¥ï«Dfòô8?퓟Ôvô:ή®Nº»ºwÝ{ï½ïqŠÖÞ½øâ‹åßþö·oÚ´iÓu€(,,ÜõøãÿœT;êLB5“ž¤ó“ÆŸÒ‰–t§DºARjy¤ð_eûŽ¥í MJ?áü«4R¤››â?þñ÷ÒÊ•oµ·µMËÏ×q¶LÒÍS“v˜ÌRž‰¬ú‡aµÓD¦J7Oõt¸hçÎL™2uY]]]¹—&béÒ¥UwÝu×â®®®r€¼¼¼= ,øþ•W^yøŒçtA&ÂyÛLR.pžzÙ›'ÒOºœBø$œ§z‹j yʤJú =É'Ÿyæ™ò{î¹gq8™Ÿ_€B%m-™Ý.“=ˆ—J ÏÉ"S—FL©LISÓ€6mÚ´„S#IÄ®]»¬qãÆý¼³³³fäÈ‘¯/Z´èg³gÏ>“É'N¸tâe’nqúV7=$I™$ÉÖŸ”N¶L¶›Ÿtþ­\¸páÈY´è!Ë4JJK°L+%4 ÓHÒ“\ÉV{ÔK'«ŸhRÒÞÖFSS–e=¿aÆ%………§äMçÝ“ùóçO.--íX²d‰÷·ÇÏ45²¯ëM'ôT ³IºtÂõ©fæ‚p‚äO°ù¥œ‘a¿¿Ž’Þ _}õÕ‚o|ãó[ZZf†B¡a÷ÃÔžÒ)Tž=—‰l’¤C¯ÂhkoçСCD"‘M&LøÅ믿¾zîé‰Â»/gÑ<ôvÝ*-ß›¥/ÒeS7’r°C$œ'á¼”‰\þ2ßçžþ9è•h™>WK–,±lÙ²©üŒmÛ%êáËûuA¢ghÑqœx Ø___¿áG?úÑúóÏ?ßûíÂ3u’ÿoA:á¼mÔËÞV—du¢äJÂyΓtÉ•M}Ìd³ù½’™H–-ÈžéÛ±lèÍHÿmˆhÿ{)<àm{#œ—O'WºÝ–SÂyq¸¾.‚´ã‰•æô­J¦çéGùÎ<ôóçûCºlªf¦ör?ἕÜÞ@=ˆ u¼ûk³ nýÁÉ ]ºÔÊ{Ëiü̓iWú<Òù ç»B´!r áD‘-DàÏŸñ2.§È´–Ò?tÕ1lô²MÏÓò! úç¹ì¯3[꫟AA& çå='ˆ_ÒõF¶L$êXC¤B6œH¨ SY ØŸþN*-1?(this.runtimeStyle.backgroundImage = "none", this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.src + "',sizingMethod='image')", this.src = "static/transparent.gif"):(this.origBg = this.origBg? this.origBg :this.currentStyle.backgroundImage.toString().replace('url("','').replace('")',''), this.runtimeStyle.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + this.origBg + "',sizingMethod='crop')", this.runtimeStyle.backgroundImage = "none")),this.pngSet=true) );} #wrap{display:table;height:100%} pyramid_zcml-1.0.0/pyramid_zcml/scaffolds/starter_zcml/+package+/static/transparent.gif0000644000175000017500000000006111736362264031324 0ustar tseavertseaverGIF89a‘ÿÿÿÿÿÿ!ù,T;pyramid_zcml-1.0.0/pyramid_zcml/scaffolds/starter_zcml/+package+/static/pyramid.png0000644000175000017500000010043711736362264030457 0ustar tseavertseaver‰PNG  IHDRî©t߸7 IDATxœì½wœÅ÷ÿ®ê ›µ «œ³–@QÂ`‚cls€qÀÙÆáî±§ó%ßó»óÝÙ>?ççüpNgŸ³}‡98°M8L2QH("i…ÊÚ4©»~|»gzf'íjvV»ª·^­éé®®ªîéíþÔ·¾õ-…eÄsÍ5×Ä»ºô´X“·H}®vÔ03ŒaÐ8Üõ;Õ1¥Q ”:f0¯*Ôv0ëL&ù|&“ÙýðÃî:Z,‹Åb±¨á®€ep\sÍ5ñLÆ™éjo¥6ꔺ˜¦E)eדÀƒR*‰1{ æicxÈdÜ?x^r‹ñ‹Åb±X† +ðFW]uÕ—èÕà]‹Qg+­æ*¥0Æ`Œîê*”R(¥0€qÝÃF™Ê¨ß×üìw¿»oãp×Ïb±X,Ëé…î#„s®»®i\Æ»ÁxÜœ¥§Àó¼a®Ùéˆxç¹cÌK(õË„›üÖc¿ýmçp×Íb±X,Ëéî§8«W¯ŽhÝx)Žú¸Vêu(ñY·Öõá!ðB2Æx 6»˜¯¶6œøþÝw?Ö5ÌU³X,‹Å2Êq†»–Ò¬^½z‚ŽÄ?­õJ©å@t¸ëdÉ¢”R ®N¥âsæÍ]°ãå—·íîJY,‹Åb½X‹û)ÊåW]{™ç¹Ÿ×J_ ÖÂ~*£”Æo†/Ä£|ã¾ûîKw,‹Åb±Œ>¬ÅýdõåW¾¯i­—yžgEû)Ž1­u›1fUÊõÚçÌšñøÎ;SÃ]/‹Åb±X,£ +ÜO-Ôe—_y‡VúËÚÑSìÀÓ‘ƒB2¦Ñ磜ö)“ç?ùÊ+Ûû†»^‹Åb±XFV¸ŸB\ºúÊÛ´V_QJµ+ÚGÆF)¥Î‹D¼‰³gÍ|dçΉᮖÅb±X,–Ñî§«/¿ò=Zó”cŒí#ƒAiçlƒš6cÚ’‡;;·Zñn±X,‹å¤±Âý`Õå—¿ÞxêkJéñÖŸ}´`PJŸ‰“Ò»vìøÝpׯb±X,ËÈÇ ÷aæÂÕWž©1wi­çZÑ>ºP œ5{Îìõ»vìØ2Üõ±X,‹Å2²±Â}¹æškân&óeí8WXÑ>:QJÇ ,;{ÖC;wî<<Üõ±X,‹Å2r±Â}™2}æÛµŠ|Òã` ì2Êc ZéIž¡cL[ë}Hc±X,‹Å2¬p&.½ôÊÀÿUZMµÖöÑü¾j~C,þRgç·»>‹Åb±XF&V¸jÆœ9wjÍ[l™Ó¥TÔY3§ÿº³³³w¸ëc±X,‹eäa…û0pÁ«kG}k­í§:Pú@ç®k‡».‹Åb±XFz¸+p:â8úv0sŒgýÚO—Åx­u#F½ó /œˆÅb±X,ˉ wN7Î;ïÒ9F¹×+ ÖÚ~:áyƘ3ŽÜ3Üõ±X,‹Å2²°÷:ãÄôÐs‡Ûl—ú/¾Õ=¦áº .¸ ‹Åb±X,–`-îuäœsΉ‚¹\iÝàyvPêéˆg<<¸(v¦/w},‹Åb±Œ¬p¯#±ÖÖY&mÎ6žÁJ=M1 `q$9+Ü-‹Åb± ë*SO2™ù`¦ZßöÑRªä‚Œw.òÍb±X,‹¥*¬Å½~hãéåJ«˜±n2#¥ªÐÚUõ¦˜×N9çœÆ}O?mcº[,‹Åb© +ÜëÄ9çœÓf±RϺɜҔç5ùåŒÁÀ¢¹ öAg-²´X,‹Å2ú±Â½N8ŽÓh0óŒ„îêŒZª²ˆW`0¿Ï@ÊõD¸Mg>V¸[,‹¥z•Ý,ƒxf–QˆîuÂÇc‘ ãÍiìÕìyiâÑÚ ­¨…P¯w™J)0F5ª’Åb±XF?qàÓÀ" Sd¿ú€ï¿`Þ¯ó¸þ§D€µÀ[€v`2I˜ Ü4Ow°\˱½N脊ÇmÃèÓÒâîy†hD3kj;^éAk(¥"Œ{-OF|ŸìïgŒÁ£=ÏL:©Œ,‹År:Öç•IÓˆö ÷‹€w#Öüqˆ`?‚ˆó€ÃÀç€Và àI`°øß~ßÁ ÷!ÇF•©™hFL#Æ ûD@ñôö¦¸ìâ¥üí'°pZо¤óùûUè_­ËVEþ ×u•­•blÿ;Åb±X,–¢ Q!MH "ïnÞ ¼„ö?ó·ýÐÊw)0iHœÊ#9ˆr-ÄZÜëD4ÑFeN·PJ)zúR,œ7‘¿ï ¦6üžO¿µ—5Fw/4DG¼ê¯ËÀ­åµ½æƒ±Öçc£”ñâ5«Ô©ƒÆ„–fÿ³Õ_oð—ÒíÆCü½ÀqàUàpØOñ®a‹ÅbLC\;3ºÇUzUã_Œ]þŽ"ÏãuÀ3þþK{ÛnÄ"¾¿~>2'ÉäA–k V¸×cÔh’íÕØD2Ø–>üîULÔBú•$ËôqûU­|õšT"N}ÜcŠQùÂ2|W £âv˜\̦ûßÇcýÏ&äeñ?µ¿”z¹xþâ"Ö>D´ï6 /’uˆ˜ŒUÉb±Œ¦ â5À,ä9sqù69Ñi©ž8ò¬Vô7®8À&äº_ <,~…üV¸×+ÜëÈHWiýh…ôžgȸ.·ß²’+VÍ'ÓÛƒç¼T”[¯H²}_#¿|TÑÚ8tu†…w¬FÈô˜pzE¾÷Ì(àMH7jóäÝŒ4¦+€‹ü^à!àgÈ‹ùÕ!(Ûb±œÚLA|ª¯,Ø>X\¼ Ti© bHy¸xòZ[ ¼~ëuZa}ÜëÉ)àk^/¿p¥}‰4¯¿d!7ßxn2çfC&1;nH°t–!xÅL)^ç¢õ¦túRªºTÞÅòLÉÅ–¼óÄü¥^Äëþ»+Ï¿!7;Ð×b9}ˆwÒ_´‡™ü-"ä-µÁAzAŸ&ïvÛ±Ööºa…{ÝH`ð0fx–*áÁ¥ ½})Î:c Ÿúèe´D!“L ÞH&`zGš?gŠŽvH¥ â9RMþô_ ?]±4¡´yé•Ô¹ßB°0 z•B)åï—ë‹7*\¶‡sà8Ò=ûMà׈EÞb±Œ~Î>TEºËç‚•µA#Ñfžzñ¾qOr†±^§V¸2Dö_{ì`èKdhiˆòÇﻘÉ›I§’(<0AhXJ“LDX>?Í7¸¸.d2¾¨.q…u*›.ï¼*,’ªÌR¹NZëŠi¤î³Œ¥†Dù¿´ ou,Ës)2Ƚ X‰u ¹^1òÅxÓ} ° 2öÈøûFcÀ…S{3ב¡ˆ(Óßï¼ú2NæØRxžÁó<Þú¦³8ï¬idzXîÏ€Ñ~yIi®½(Åã¹ï)C¤Qöôk2iDÖ7—$_‡S©ý¼07É£xcÅøÿ—lÌTÓÆñ{‚ÿ­|¯9mHø²iÀg_L‹Å2ú˜<€´“A™¢ºŒ6’À/w˜½¡í¯_žÿ,þ ñÿ<[ךž¦Xá^O©ÔÊZ¾KäY•µ|€õ©”§RоdŠË/šÇm´/Õ‡çy!˜àx%"±²Çã†;Þ˜b×[_æF¨8¦H]_w¥Šïƒ*¹¿|™¥÷—>°_(È~ô£ƒLæqèBb§—ip%ÄŠÖŠ„w›ÈÀ{p»Ÿ×Hw®Åb]ô m6”ì@è¾XdûVà#¡ï_-Øÿ§œnoµa ÷:‘œ"j´ª(&¡ãªu_HÈÄjy%´Vôö¦9cÁD>ó‘ פI%RAe±îúî2ûûV$ó¦»üÙÛ2|ükQNôb‘œx/W~©}•Ï©øõ)%èË)úbe•®—|c†Õ9¼Îüyf/ò &òH“ÿBÕH÷lb=Ÿœt‹Ÿ‡ˆùjPÈ ©ÈL6l¤Å2ºH¤˜g±Õ+Úë„îu¤˜»EwJ¡OÂÆä—WÓßU$X/Öû›+¥H&3Œçãï?—É“šHu'AûÖåÀÊL•jÊ„\ç”G²OqöB¾þþÇÏí¦ýz;„ZB$|7áíácŒÉ}/8çR×£’0?ÃÂîjðŒw: —Úü÷Ò ÷Ò=» ívÕGù2ˆê‡(Ûb±œúüx ¸¨BºÀ½XQiEØÁ©õ¤H0’“ ¹X.Ÿbyi¥Kî×JݯPÙ}á%||&í’q=>𶜿b ™Þ¤¸Çxžø·>ãùϼ¡£"â=M&i¸ñ’7^ ½ q§ —_x~ŽÒhÊH“· 0Uáº䥵ӯ Gk­ÑJe— 7­šÐä-¹¡pP8h%Ÿ*(³ðÚ>&÷“1àbaûðFànªëúŽŸB&f±X,£‡ƒÀ_P~‡n$äsu©‘ÅR'¬p&*Em f׬tü@"­”KS*oŒÉ-Åê $’.—ž;ƒ¯šI¥ð<L ÿè/›Œ ¬ðâæn”ñH{Š˜V¼÷ê ¦+™ü(1ýb½” SM„—ÜR,ÒLÁ¿øVJçÊ G“ñ×µ–%»ˆ¿eÐàIà½Àÿ¡ºÁfKK½Åb]<|qÅ;‚¸Ã$£ÀSHœ÷ïr:™H,§ÖU¦^$À89÷‹b®aÂn(åŒÿwv¿$ª~ß—H³lñD>sÇy4Ç • ´TN çLû®o€Ñ„Ý̕ր"•2Lé0Üy³Ç_~'ÂñC,šßn´ämÔºð<2ø´ûUä×/ûl)EvlRJgËö<‰°cŒ¡„›½¥2Kº |œòÏ1î¿B–Y,–ÑÃOwºyHÏš:]À¡a¬—Å2dXá^WLö3'ªË„¤|”“ʾÝʰè Êêó.Ü–L¹Œimàß³œéÓ›Hu§D˜~íá:d¨Ê&±Z‡2 ŽQN:\p¦Ë{Ö8|é?žHÞÔÙQ«ë\í¹ôObòEy òV(PA#!eÇ2\$fû<àÍÒ.®Ã w‹e4r ]øôpWÄb©ÖU¦Žä{äœ> ·«"ûú;Š”ö‡Ïù™ûSéþÇÙ–u)²=ŒÄk‡÷Ü|ç/ŸHª' x~eƒŠø“.eÝf‚™XµÔËàûËhäVÔ`4Æ7¥¸ñ¢4×®„¾¤øŽcü¥œÜ1h±Â‡|] ýñå¼Âî1¾‡zÖ¯]ƒ’|%oGòÒ¹¼ƒ‰–ÂKá€B—Yü<ý¼‚ßÔößž4ÝÀ(ïç bu_Mu¶X,‹ÅrÊb-îu$ì“s…éŸN…þï·ï¤¬Ì…å”4·—È+U%™ryÛ ¹åºyd Œçf9*M†`=ˆ#ªÕ®B1rüI™|ÿ2ˆD ¹Áãð±k7šÊœÅël ¾÷?§ð)«Ð9—¬?ð—ÉsÛQá¯è¢å„\¤‚ØBÆP*$¥e@üø7Äu¦KéÀ¶!¯‘Åb±X,C„îu#A0{°…ó‚æa(çÂRé»êç…HGUê 7ŽPB¥(¬b v»{3,š;–w¼e±ˆ!ðÐYŸö°XŸQÐuÍŒ\‡)¨“lO»0¾ÍðÁë]¶îuèê…x,—.ïS0& ÿ#”6×,!ÚÚOt wò¾ãl ûßk•/äà ­<<¿C^ Àr2ü'ðAd*îRt3±ÂÝb±X,#+܇œu·: zU~Ô…_Šì¯lu®à÷­©´Ç¸1 ÜñŽ%tŒ“î ÏkQ*ŽúW™¬…BŠØÏE!iP$“pÆxç•ÿï×"’#¡»¶”¥½ÔIî/tv ê×#Q&¯jz8Ä•¦_2Ëɳx¸¬LšÄþÁºÔÈb±X,–!À ÷:ˆZcrQPªî%¾©B³zx›*bËWR4äÆÑ/¿Âº¨À_ñ®7/àÒ×ú~íO{6«‚A©aK|Ð@ØÚNÖZžmÌ„º<™¤âÆ‹]vîpÏZˆFB5ÍZØs¶óP»¨È9…NÈÿPy×4\­°;S~š~ü‚4á²åtZñîKm8Š <-'ÜA\edÀ…Åb±X,#+ÜëDˆdµ¬ hŠ˜ÊýµBx“b2?ýõhQ”Î;¯ΛÂF„¡;áò–+gqËu3É$Ò¾?{vDlá®(ˆÿîùb8‚2:\P¿:øUE¡H»šxÔðÁë ûFxv47–䯄s,s] …{‘ߣŸp/Ù3Q覓ÿ]+…1^nÀ±µ¾×Š$þ­íXá^kÚ€9H(¾qH‹¼™õöÅ–Z)Àä·l%7à8 Gâyö#wZ€ÀT`¼ÿ]=ȹîvSݼe âb6ù}›ýí=È5î^RCPöh@#×mòû‘er¿îö’›1Úb)‹îuED¬vræðBw‹@ær”ý¡õ57œO^~…ŽÞÁÖâ:9›°_£@)ziÎ^2ŽÛß2›ˆ2¤\7dåœÀC"ݘ|!o‚m"ÜÊÅwT&Ü=*׈…Z)He ½Þ·þúǺ!í=ŠŸ²Ê¥)lÏ”s)Õ{Q˜¦Ê<ƒßW: ÂMZN–jDZ#å›K³€³(/€¢ˆP©Wè¹82­{ ¥g‹""jÕ+z "¶ ó ºÂ6/WÈc)p5°˜ø?7ÿ} ¾‘¤±¸88˜ŒUhD®KŒ`àœw0O°™„çidҮ݃¬Ç`˜ã×7°l„‰;*äÑ œ \ \èçÙŒœ{ðäK½HƒåYÄ ìNþ\Û•H$¦ó‘FC3òû+ûàà7Ôw ÉL`9ů3ȵ~©_53-× …üM¬.@ê8ùŽ“Ó]idð[Ð[ <<y‹¥(V¸×‰8É›0Hû‘Eòr1#4ôwù(eÏϯ=Љÿb;Ãù¤S†ö–8yÛ|&uÄIõ¦é7*3‹ µ&Â0Uv]a Ux»’%¢]‘?@V‘JÁÒ9†w__þ…Âõ  &³R¥Ï-lU/ÚK¡ wCjlå‰õÂtyç婵Î^3ãyYWKM¨Å‹yð¯ˆ-dzÀõÔÇBödöÇñeÒ(àKH„j¸øP™ýÿf³˜èž¼ ¸ NÅÞ!ÍÈ5Ì > X\ƒˆö¹ˆXuÊäÓZ_ˆ§$°¸ø6°uu(W_¦ôùÿòkd5—FÄs åÃ6·#–Ü%À[€—€ïßB⛄&à*¿ìóÈYö«)ûMÈX“Ÿw! §¡f rËñ ä|Ž}uˆ# ¶w ×qÒ¸¬†yˆÈÿ°¸ø&Ò£a±äa…û0 xà¹ï¡=%Ü. ˜5¸ÿäMù‘RBéµÊêcÝ23®°0/Ï3(m¸yÍL–-Cº/«]!ŸFl#”ÎOƒBár1äÃç›s2¾ˆ[°‘0‘¯;žÝá¡õ2¸T²*g9_ÎP'Ô¦(7¨U[è^ÓßÝ&´O4äŽw¬X"ªy–õQ>”Ï3ˆø½¶B>ËeÀÃUÕlð(Äâ9½Bº£ˆµ³ZëvÃ¥h*±}%ðUàµU”1PKû"亿±æW#Ô+¡+ñ2y#ðÏÀZ!ׇܥD[«¿¿Ð½dðYàfD”ro.Gziþ‚êÝ•"!UßNΪ>¢~Ÿ^ürO%šò÷1 î\ÃàcHƒ¶cy÷kð^4ÈônX,€îu#™í;¹+òq§¼•\)•5l‹ø.ÜALøÜvSDˆëP>Z+L­H¥\®»l*o½~:™dσ¼€‡…âÜ„…z˜@Ü#JÛøe«®r'ï[ã¥- rãYQdÒâ"óþkáh¯ÃK†Æ¸œ[~ýK\ÓbÖõ¢»_C©H>ÉKÿu•©1íU¤é¡¼+I/ðÄbZî…ߌÌÄúbÑ*Z€7T‘îà¹äÛëRâ8†ˆ¢°ø~b‰Ÿ2€rªa1ð~àFĽ`(Y | ¹¦ŸEzN†‚.D”—î þ¾°p¿½ójT‡ñ÷ Äm©ïEDûü•}!byÿà+HCf(¨fxÿP‡ˆ#O ÷W-9 é%Zü9°½Æù[F(V¸×‹8]«PhÇw›(ŒôB¡°TäŒó*d”»n@RQ6…ÖKä£Ã¯Á±b´·ÏãŒym¼ëMÓˆG©„ñ³ ? MpR²^èçžÅC&\R`™4ä“·.£p³>î’Wîd“?Þõzøûÿp8Þ±Hp¯ ¬ûù¦—ì‘u óH^Y÷¨à\mT™ZCºì+qÊ–àGwƒeÒ]ƒXŸwUQî`Y\\!þ› Ä주p“ßLý#D„M@Õòzà£Ô÷]t5âztCã:ÓGy×­Frç«€·".ck\¹ˆpNÿUd¿|ø;*»‡ ”vÄâþšÑù´kBÎíä»iÕ’(p+0qÁ98DåXFå|ç,5ÆÃ`ð²®ÙTC‹ÒÁ¢ý%¼M¬åÚ_—ƒ*û©•Ê?ÆÑÙ|t(_í„Öµ–cu.G+Ò76ÆûnžÍ„ñqR‰‚÷P Ô!_ßTî7P”?ƒªò…¸XÓ5íïÑ~ÃÁ -‘кïB£‚t¥’ÉKf)n]¥¥¤´ãŸÖ8y‹“[YtDg×Ç?6X‚<'o½09® ¯Hñ¼Âùˆn7T7ŽÐRc¨lír‘]I@ì~^E™Õˆê“e ¥ÝV:Ëÿ@„Q‚ò7_œÜ»aC'Úgðbädš¿ç"¢¶šß@ F¥ûìßÀЈö€YÀß#">Œ|ø"µí ˆ%ú†!Ê8|ø8C'ÚÃ\ŽüŽÇFð9í±÷a@œ îY =þݹM…Vä"2ûùcæÐz¸Œ"Vdc@+w¼a+–´és}—–{GÞë2ô%ÏâÒA9JçüÜ Î7üÝøV÷l}³ >5é”áuËa×a‡ûŸ†˜“;ŸR1é gV ׯŸ›‹É?6›¯êß;dh0¾Êž‡¢>–š2ÈXŽ.ª³Ž{ˆû㔟‰5‚XÝÊЄákD¬Ñ•XËÀ#y¤(/ÜüýmÀ'ñ7T¼€D~¹®Lš^DÜF¢mD~Ï>䯘ŒˆÓiTßÈX|øSj+†ª½¾K16±B~.âæÒè{{)r?‚œk×­ˆz%ñ 9ÿêpD›jiA¬Ò/!ƒ.GÍÀß ƒ^jüìFƤô Ïr]ÇRþyò›mÂZ|N{¬p¯É$FGDü*…ÖN^T™¢~îaÑWÌwºˆKFéÈ(ýdVp äìKz\qa×®êÀM{¾{GÈ&åZÉÖ¥´ˆwå¢ *šuÏ),_ˆ*óÖKᕃŠ-{ñþçž=ß‚khB' ³îBábJ¸Ïôû-rAÙƒÁÁ…3²¢š\Æ<«ãkÞLåaTéâyàQÊ‹Ia½X_e¾á"$¢L9º€Ÿ0ð •„eâ~ô6ÄMf0T+ðÒH”•kÉoN'küoÿýÀ!Dð$é_ÿ/{6b|Ò+R‰÷#á"Xe}«!IåÆÜdÄÒ¾ Äþ>äüÄç°¿},¹s\M.Ž}%Þ ýO¤·á‹”Ò ¼~ ñ«¢'1Ý/E VšË1ïfäÏ¡þ7âÞU-.r=ïAB­îAîã¢Áš‘hJ¯E&‘{ÅTihÖ3´¥åÄ ÷zâ¿jÄ墿_¹¿Á—¥aËp¾P,&γ‚1ä…ž‹oÄÒݯ(ÕOàö%]Îjåí×O!¢錗«C1¡®ÈùŸ‡lnx¢©@¤‡Ý`ŸÛC‘räú¨lViWÑÒ7¯R|í¿4=IñwÏ»fAzÿøÂk×½°N½e"Ø„¿ço–HB&¤k'`ª3‘(•ØHõ.IÄêþ:Ê»ªL®`h„ûeTvaØ <4ˆ¼3”ov;ˆÕúC”à‘(<ë‘ØáI?ßvÄ2^­ËH¼í~žÿ…éøÖÕBÜœö#½w#ÂøŠ ÇÅñþÒ0¨Ê ÔàN$ìe!i°ü‡¾Ô=û]$|à'!]‰Fdêï?A„b! þïÆëá"i‚²—ŒD>©&Л–T‘öTæíÈüÕ`ëý‘ó.w/oòÓ| Åù$¤d¡E¿Ëiîu#Ž Þ—Êà8N¿8îiSn›1~˜ðþÐ1yQdò ç-žç¾ß¹¿MkE*mho‹óî7MaRGŒt_&Ôp𠕨?øT“×Þï5]ä½m4Ç·¼‡-íás ¹È9„\WŒRþÌ« ”G2©X:Þ|‘æ‡ÿ#þÿŽ"/Nzî܃ÿó¯eéž r=-ðá(?¹|ƒ1ºNÄÁó{ <ãáXå~²hà*GÃèCÉ@¬}Dâ2—ãFàëä\jÁÄšZ©þn¤Û} ³X‡q ø%öïB¢ïü 7XÌ‚tEUÃ.¤2ñH&ؾ IDATþ'ç~dÆÄíˆeùfÊ7“ÏAÜž¾we†IQ>ÚÐ<äž-ü}{€BBVVjdD~ÿ'——RÙp1Ò˜)Ö“t‰Ý•ï©£ˆùH#àÏ©¯¼i =ÆÈµ/@¢ïT#ž»þ…Ò  bBæx ¹¶ÌаŒP¬p¯I0"Dµ?ÀÑ/_<‚„| X˜Ã‰| Ý;²~Ù*°i üh‹9K}n¿á-Wv°|q3©„KÎ $0‡ý×ýÊ„© Y÷p÷àðª’ö@øT©u9$å*.=vrx|“GC,×ó­cž•»xÏEá¾|W¦KL1×¥ÜáE÷9ÚÁhWœŒÁúÊœ47ï©"ÝFÄ‚>¶"⤒p_ \2ˆü˱‚Ê‘C5.3ÌB)Öpø9"HÖVÈc † 1ðÿ­{ׂ¹ˆ³-ˆEøÇÔf¼B¥A³Å,ÔG‘(,ÿRáØB^þ çq}…´íˆ Q!‡ëô­” 9q:i8Tjh^‚4’*Ý;§"1ÄÒ^MÈÌcÀ_"Q§;xú826`'ÒøªÁá–ˆîu$ø v´Æ‰8㔥ü²+…< §)6@³XxCô$ ׯjçÚKÇâe¼")Mþy+aaø°÷·)ß¿]7€v0ALJcÀ¸~Z1Š*W¢®dõrè]è…ªúÖpOi"ŽæÍçkŽðâ+Š–¥ŽÁ‰HD9Ôàe; DDëý(u .}y×™Báî_S椹±LŽ«.ƒXR3 ü‘P}åʇXÝk)¢×PÙgÿ!ªŸ\g  …i€ÿ‡X»k\žap¿O5ìB¬ø?¥¼ÛÓ Ä¾©Få¤w§±®þû Ë:Šø\Ϧò¸ˆbei´ †$Òp˜ƒôZ”c*2.d$ ÷+°•èþð•û]dpðW)îÞd9 ±Â½Ž?ÊŠˆÉ2ƒS ¬áEÅvÁ¾âô|«2…ÇøŸÉ¤aÁÌ8o¸|,G‘._!$ÒûÙŠ øÀbX»=ŒIC¦“8‚!&n¼„¬{iÀÅÆx.ö­Óžˆþ@ê*oþœF)’hÚšàª9Üý›&N$4-M'B,%LjÇâòo ÓFú]» êÉ6ò¯}±k¾Î…ÛGãyâ cŒ±Â}phD(ÿ-•géÎìÀÃ? þוfR½%{YN˜ Èl©åºc\ÄMb°ÛT YŒ!VÙZ‹öz ò¼ºLšéÈÌ¥µî.‹RóÄõèdØ…4dÿ•E:ù ð³“,ûby¿é½(…ƒÜÛ È=8RhF& «4æÄ ûû5.ÿçÈýùåçk¡Xá^gŒ18‡ˆ Í^šo9û¬çìØÅEwq—BÇ—™ZC*cÚ4o]3qcâ¤.yÖóìá`çQ ØMZ¸Ic¼Æë7ñúÀK`L÷È>¼#{}c¹KÖ0¥²sÂb?+šÐá“Úw©ñ­øAµ ôuiΜò*o=<óóÇpœP½ý뢵&‰à8±XŒææfš›šhnn¢¹¹…ÖÖ¢Ñ(±XŒx<ê­ñÆóü߯¼>|͵Öx‘‚ –0 é’¿ƒêbOw#~»ƒžFDÿ5”Có³©p_€„ ,ÇzDˆ—uá?„…ì:‰2‡“È€×rÂ]#.‘O6#÷h-ÊüOäïãœ*ÓoGÜ0jQöïßìJQˆæ"½ICÕÃ2œ‹ ­Ä}Àÿ¡ö>üby b$°œæXá^OŒ¸eh¥ˆDÒ‰&SiÒ¥ÿöD9áVw%H¬ñjCižª¼€ôP”‹[¾±¯Käýµ›½õ0"«î?Eâ«×‚4Ò蹑ò‘ˆ&"½S#E¸+äœ*M²Ô‡ŒO¨6 Ò@9|yþUнoåXá^'€ãûRƒSµ ¢½äÒåù¨‡|¹Uh)ßöÂÏ¢þÙ!7õ¾\öÚf®¾¸ 7í[¯M¯=ün×`\ŒÛ ™pbÜ^p»1^JºñKdõ«¦Ÿ!Ç(ü^TDD¸/ÜsñÛ ÂOªp¯„ç÷ÄBo 0n˜¬å=M&­ˆE ñæcì>4†'¶â½Äœ©Ê]±ÞÞ^zzz0æUœH„X4J<§µµ•¶¶6ÆËøñãioo§¹© ”4ÀLv0l~ŠXÜ# ž18§nçlÄ·y±'7©K˜bIŸŠø/Cb/CÂ>„ï#–Ì“l¸q'('ÜAüÒïâäDØ8à ÒA„ûPLúTŒß#bp¤„ŠœS&Í,¤ÑT/áþ2ƒ÷k/†‡¸§rŒõƒˆ·–f ±X í8x¾KMð»y¾{Íi6ÓùÀ7At'–ÄJÕ‡´òÑÞ†ˆŽvÄÊUMŒè0qoù$µ Ñè!×|™n¼ ‘nì“îg!Qjʱ¡‰_ŒðkF®‹L˜*ûçO roG-y€Ú¸W…Ù†X³+ ÷ç¨}/ÊAÄ‚_N¸kdvÛ‘Â%ÈdYåH nJåB€Ö‚cH¬w+ÜOs¬p´£‰D£/=7©P¾è rùv}É“üYט’~ï¾͸†¶VÍ_×θö™¾HNBº“9™Ãx™CàöŠˆÏºÅ˜‰C‘`ªÅü<ƒé¢Ñø¹ã¯÷Ï;OŸg ,õ€—ï½½çÎ=Á×EøÄ÷â¤]ˆ Pö3ۖɸd2½ôöörøða6mÞL,câĉLž<‰)“'3~ÂÚZ[¥‡EëþÑkN49Q>”ô „¿F^rµb"t./“F#!Àà}\/£üྠbý®×ÑNFþ„9ÝTÙHe—ˆZ4kíOß…÷JaLŸ§öD{‘†C%&!Úc$Äs¿”ʳÓv÷ס. qû+¹|YF9V¸×‹GÜ("Ú!‰àùÂ=4l²âàST1Wš°Ð/-ܳŸZsÅÊfæÍhÄM$Å’ž>„I€ÌqŒ×+á³29,Ö–6ÈÊHv¾…=;骂à9®‚2*óˆe?4pÕ„ÜlÂû² å`€dÂð¦×æ‘“ùå:Es…Gp5¢:lA/ÜžL$èììd×ÎÄ7v,Ó¦OcÚÔ©L:•ˆ#rÆór½–Z°qùµw#éBÂ=®¢ü3ób`1ƒ ÓØŽøÉ—ã"öêÅ‹Ô.AæØfÜäp»ÁëCŒ?þ`Ò¡Âx!á^ä0*ö±˜˜G|ܳá!}z…?à_ÌCÚshˆ¥ùë7â•ÃXû2´5T¡˜h/e!/p˜/ìÕÀqȤÓìß¿Ÿýû÷óBôñ‹;–î®.´Ö§ÓàÔ¡ä8ªð_º¸æ !ÙÞƒóRŒnA&(R9÷#ˆå¿¸H8Ì¡îþ ¹ÖS¥ÙH¸¼iþöfrâÝ -S«È·ÜÀÊZ²q«5idD%jÙ#f?Ùð`%i«°ÿTa†¿Tâ·C]‘‘߮ҽlÅXá^7 Ž#"ÚÓºLt˜Ð!a_2}‘¯ýüµvȸivï=ĘØAV/îÆé:B*‘D~„g1BÑŽXÇî*h#„?)¾-õÜ">ìRàÂí.}Iͤ¶>wCïùV G{ 1jrn7Ù(;Åcµ›2פðØB‘¯ù \Ïåð‘Ã9z×ue†\oh¯õ(Æ V§û‰Ncð1Í«eÒ^N¸+Äj>‰G—¸šòþÕ.ð+êg¥L"ƒ‰Ob1_ŒŒ—X ž‚ˆôFê'¸kEŠ¡ ;éRÝßÂPùë@å„yc…ý§ ã‘Þr$€gëP——¡iðYFV¸×tªãDˆF£"àBñÐó––p‡ÉV ¶I—õ§ö<úúúØ»o7[¶î$Õû*ÿô'šÉ­è ,Éu~~šœ«L¾› ¡Jÿmý,òÙï¿m㇊ ¬ö8(åÐÝå¼ùG¸óÚ8þ³"Aç„)bm/¡©‹¥ËÛV$¯ Á¥)Ðu½ò!n,¥8Œ¸ÄÜDVYËÉ…š(?F¬îåÜ)– ƒÇþcùŽõ)'¦62ôQ+¸œ\ÈÉZCë^‹Œ/x •d4 É=ø‡&ïá"÷rN‰16IÔp1i–£“Ú0.‡¡¾Ï<Ë)ˆîuÆ@Öâ®´&/hc%ážu“Qy"W„nnR!×u9zô(;vì`÷îÝìÙ÷*==)þþcí\x–"8EHšÐgÈÂLTšg‘/vlÈBo‚è6ÊŸ‡‹Q©d”[Î;ÈK{&óíGZÃó|òŠÌ³¾÷æý¶»¶á¼CÁ H¸½rS»A¬î¿ úÙI—"Ó”ã—Ô/L!ÈïUÏòÂDËú›×£)ÃTËÀ ‚§lšáF!=g• }o_!§ÀËÛ2œXá^GŒñ0ÆC;ÑX'kq(1ð4›]å¥Fi‘þN$B:bÇÎlÛ¶={öÐu¢ c ½ ޾™w^¯ðÒæÔôÐ0ŸøyC¾'äÚ-Û‚°™&ˆó—´çÐ÷øä5GXßÙÁ3» ÍñPxI“›Õ4ãÆ˜²OÉÜïv•ñ×C ,0ÙüÀȽpÊ¿»jƯBü‘'!>®ˆrpÁ2Hä.àbí݇¸Ä¼Ê©1Ez/5æõ”~v*dë4ª›dÆA„~¹ˆ;ˆ›L­\+ªiPx Ï5_ |i†òO›?Ê!b´ˆJ Z‰½ÔoN‹°Â½þˆhM4ÅU:$ÆC¾í û¨(ñ:ç;â8­4½}}ìØ¶Í›·°{÷n‰ÆGÓݯYå3ïj ª É4#çÑZÔ&Ï]†œŸ|v£JLå€JùŸ.½ ×|œÏ\ßÀßmåX/Ä"AY*ßÕÅø£‚ –÷=”¾X/F~”þÐy^òà(âÖ²i†M±°5+ˆ5g4¤ÓÏY+¼^tÛÒ¥K×nÚ´iƒçyËËd½páÂ…«7oÞüDèЧ o»ë®»&}ò“Ÿ\ÓÕU:Túœ9s6ýêW¿š´lÙ²Õä®›*X7oÃûÃ×YΧ>õ©e_ùÊW¢©Té÷X,ûþ÷¿ÃM7ÝöÕ¯æÉaЬ—Úf\×ÅquðàAõ¾÷½ï‚{î¹ç&×uOÚ®dÂãÿMJ'ž1:ô›÷Ckí\~ùåSxàYHCÒ -nè3X/v^L:5²ÿ~e*¸Ã544¨¾¾>¥²“SÔ„ÓëÉ2t8TaèC3VÁb)‰îuÆ“…3)X*Ìcž•]d`$A;½½½lÙ¾• 6²{÷n2™L6¯ˆVô%=ƶhþêýÌœÉFŽh/Fø•äÛi 7åN0làæôôŹxÁ!þäÊñ«8®§ˆè.Òë1Ð}ò½Ô—Ó†°{L „*⋬°ø,©¥>ƒu‡\8ÀÂÏðRl[Ñå©§žŠ¾á oè|ðÁË ÷ȸqãÞìØ±±íííAC¤Ø¯=º0•J•Œ¹­”ò®»îº½Ë–-[@mD™3f̘±*~ªx¹ª©©©±&™tGïÚµ+~ûí·_ó裮r]w@¾ÏÑh4ÙÐÐÐÛØØØÝÖÖÖÝÒÒÒÝÚÚÚÓÒÒÒ×ÐЊÅb™††† Àý÷ß¿rÿþý³Jå‹Å¢W_}õJľÒ9Šøl£óŸÿùŸÇ¿ÿýïo;zôhɃÛÚÚZ¾ð…/,ÆÌh—]2¡Ï ¹F­)Xï÷ùÅ/~1ò™Ï|Fgߥ±b³<šÊñÛAqÛð`–ºb…{1þ?ÇqˆÄb(­ ÞéY?u¥roy¥òÜ-´Ö8Ž&™L²mûv6lØÈ¶íÛH&“8ÚɦSÒð<ÃßÒÄê©^3²E{@¾gJŽ`W#穌";@5χÞÁ3ŠÞ>‡[Ï;Äó“øéºÍŽÉ^ó~e!¿ªz_9yåöGa¬¢hhhˆõõõµ“ßa1¬ >£þêH‘õbß Å¹ö?s-¶|ªÝ–·½¹¹Ù¹ñÆ·=ú裉t:]òžqãÆ%O=õÔØ+¯¼òp©4étÚ<òÈ# ’ÉdÉpmmmG®¾úê]ÈyÔB ¤¿Ç0°ôEïÚµ+zÛm·]÷Øc]ZíA Ý'NÜ?}úô=Ë–-ë\ºté¡E‹;묳NtttdÈÍÞ ïì³Ïž[N¸¤¯DpϦ×ÍÍÍãÇ)ûnmiii>ãŒ3ÎfSüú÷mÐ Ä|XÜg ¾{ï~÷»Í÷¾÷½/¼ðBÙÊŸy晓֯_?³ ÏÂÆHvŸRªÚ{o´ˆXEuúhÔ<È-#+Üëˆ1bqDbÑÕßÍ¢¸Õ]FH&Sl|é%ž~úöìÙK2™@k-dBægÏ@WŸÇ‡ojå7Eq3§ŽL¬*˜Ê`ayfBÂXhr“4‰qÌ%Jc$Íç®;ÄÁ®É<¸IÑêOi10kz¾?(¿Ô€Vå߯;u~“BŒ1‰üˆèðzð=Ä.¸à‚ùk×®-ë°xñâ™ÀÈ·œ‡{x)Õ4+çvQì{à7_k¼[o½µóË_þòÎ;v” yâĉñßùÎwμòÊ+.‘D½ð ­Ï>ûìÒr…-\¸pëš5k3zQ€êîîV7ÝtÓëÖ­»¨šZ[[¬Zµê‰n¸aãe—]öê¼yóúûÐ,…¿»J&“*NU­¼ûÎTò‘ñyžÉåþйqèx<®§L™2±’p¿è¢‹–#3 ‡{ Ý‚²ßÉNŸBzaŠ.7ÜpÃÔ_ÿú×Ý„8õ¯¡:ßõ(£Ã$fAXá^Oü׊ÖÑHÔ\šß3¬u¾hŒD"¸—Ý»wóä“kÙ¼e }½}(­ÅÊ䢧ÏcÙ¼¹%BÔä0RJÎÉÑ sˆ7óÍE\ÿšhÝ*2®2Ü{ÑCD¼èD:ÂÄÖn>yõ Öïiçx|ös—óù½ç…è,Q±‚ã_÷ eJzO Œw’Â%xᇗ8ò²‰Ù^ŠùIæ™={ö´§žzªì‹:7 ñˉî@ÄœêxãÇ×+W®|±³³s¾ëº%Ÿ¡k×®=óàÁƒutt÷Ýwß´ƒN+u|$I]qÅ/2:…ú«¿ú«åO?ýôÊJ #‘Húì³Ï~êÎ;ï|ø¦›nÚG¾Ïþ©>ûf-(×@ ãc´çU5³[`Qvè•û^ØH »ê8W\qÅÌûî»/šN—Ö¼Ó¦Më¸ûî»W­X±â(Ò& Éжà™Ð¯\ÇqT§:Ø#ê¢Å´02B[ZFV¸ŽÖDcQ_C ô}Ý#‘Z+öîÝǺuëxö¹çéêêB)…ã”6¥2í­š¿|SÇ;$û†Ø°d¯B"Ýå(ðg;íIŽÍй§—›LÓ0sŒm„¦¸îyñÏóç&ʺþP°2Â3ÓêÐc< ZÓÝ×ÀYÓŽñÑ×5ñ·÷Å1€õ„d‹Î³Â–Q _ÎZo Iç½u|^Ì$ü=<¥{Œþ<^°­œEh°‚0ô«W‘XT}á`¾‘Œwûí·o¸ÿþû/9räȤR‰^yå•?úÑf~ìc{™"ç~ÿý÷ŸYn°ä„ öèCÚÄ(´¶ÿö·¿÷ƒüà ÏóÊZÁzn¹å–_ßu×]ÇãA¨Qw=†ƒB!æò“A"\Ub"òŒ=g¶ŒR¬p¯ b ž÷hT&úS*'Û ¾¨Féíëcà xøá‡yå•W€ÜàÕbÖM¥Àõ ©´áη5qÅù’}µ²ëæŠV€ÖàD5ÚQàÈ“„cÝ.{gؾ³Ûúxig’—¶w³igо>hk„¥Ó`ñ4‡ESaé4—y“aB+´6@Ä‘r\Ò!1œLUçã½ëÓ]…t‚qð ô¥o?ïU^Ø=•_>ïÐÚ@ÖW^®;ä½[ µVÐ0(Óe/æ Æ¦L™2öÀ¾= é/¶Ã¢»Pœ~ÛÙÚ|–ÚVŒÑ"¤ë¹òÊ+.Y²dóc=VR¸§Óé¦x`‘/Üèõë×7mÚ´iQ¹BÎ?ÿüçg̘‘bôýNæë_ÿú²ýû÷Ï,—(‰¤n½õÖ_ûÛß~,8®u³ C•nBáô”ÿM#ÈŒ¹P¤`Á‚s* ÷3fLúüç?2'AÒXöƒAšÜxLø»RêHç1y>wW‘¶VX ÿiŽîuÅ€ñp"¢‘¨¸]hñ:PÈŒ§(غe+¿{ðA¶lÝJ2‘$qrÇ—Àó «×ã=×·ð‘[cdR^6ßZTZ)¢1 æ›×ÓGNxtîKòòîÏoîá™=ìÚ—áб ‡Žy44gÆôÙ,9c!7¾ã¦M›Æ¶mÛøÃžá¡í;øáÓ¯é;Âäv‡q-Š…“aùlÍkfxÌè2­Ý£­Qô¶ñ ™´ëP:§¯œ@ò›äÖq㟻î{NtðÔ%e^‡°ÛKx,jIËz."P0y–ça* æÏ¬ U%ü"+õ9ÜIF;Ð7ÝtÓ3ëÖ­;7•J5MdŒZ·nݲ§žzê±óÎ;¯‹œ¥Xýë_?ãØ±cãKÐÒÒrüï|gyG呉Z¿~}óo~ó›K*¤3çž{îSV´Ÿ¶T2>¨j\‚ZZZšZ[[çѶѼÁ·ôìkÞûÞ÷NûÖ·¾åùc~J1Ò¤IS8PrzÑT¦Ò2Š±Â½^$ÀDLvpj4ÍF# f<=~ì8>ø O<ù$ÇŽóÝbtQ {!]½KçÄøÄí 48Šd‚ú“uw‘:¥AÐ6о—]ûRlîLñâ¶^ž{©‡-;ì>àâgÌØ©,9ã Ö,=ƒåË^Â…ó™=kMMM466úâÕ¥··®®.^~y[¶nå…õxqÃFžÜ¼…‡¶Æd’4:)fUÌŸª9k¶fé4܉Ú24Ǥ¾®Q£ðüÅå«_'8%Ÿ!І§ô¥£LjKñÙ«»ù㟵²÷¸¡)\šü¨ŸzaH‹{ñþã[Üý‰°‚xÑ#‘ª,lALmF—øro¹å–_ýêWwlß¾ýŒR‰Ž;6áG?úѼóÎ;ïyrçï­[·n^&“‰–:nÑ¢E›.»ì²W©ý½QµUÔ³…ÕöwSßùÎwœ8q¢d£`̘1‡?üá?ê­É5¨&^ºëº'{ÎFk]Íß¡rjy}‡óo2p‰+‹çy'{o@U;Øu]—ÒaMÃ.ˆa"Ë—/×Ñh4YªaîÓzÝu×½ç›ßüæ#È`ß$bÍO >òÉж td8´§€ûÈX¡á˜˜Ìr a…{ þRµ–™S '*‚rËæ-Üsï}lܸÏóÐþ ÕJO&$S†±mŸ{O 3&i’=¦¬h÷ ¾âîâÈÀQE|_\—®>xõhŠ=¯$Øðr‚ /w³öù.¶ìréM(š[ÇÐÑ1™Ž‰“yÓê3Y~ÖkXqöÙÌš5‹±cÇÇK–¯µCKK ---L™2…‹.º€ÞÞ^Ž9¶íÛyöÙçxþ… lÚ´‰ßï}•_®?Dª·‹ö¸Ë’i^;ßaÑÅâiÓÆ)Æ5§iŠËùày¸žGÊázžQ~ïFØp’oDQÊГŠpÞìc|âŠ(úó\£È;¤P˜—šx©Øvå[é• ¿­Gº ­Jú†±‘|žE™4iRzõêÕÏ–î©Tªá÷¿ÿýbàü?ÿçž{®içÎ%ÝDÇÉ\zé¥/¶·¥ã$ IDAT·1¼kÉ@ò’ûóÉ'Ÿœïy^Ùîþyóæm½í¶ÛöRß&UA;Ü £Á¸«Ô¬ìêÆÅæ•=ØòÛ˜+,¯T>fÖ¬YÇz*wÖ¯_¿ xÕ…y†Ï3pÑ D|qßÉûN~O@6òoΕc9M±Â½žø¾Žvˆøî2ÝÝÝ<þÄÜÿß÷³oÿ>”ªtÕ3Ï2®áConáÚ‹#¤ËŒƒ7Fôc4"¾éDxŠDÒãða—½ûzÙ¹'Ŧí=¼´£·ö²}w†¤i¢£c3¦-áš7Ìeñ¢…,\¸€3Ï\ʼysin®MÏ]SSMMMLŸ>Õ«Vpôè¶mÝÎK›6±eÛ66oÞJgç.¾ÿÜ~Žüî­‘.N‰°xJ„ÅÓOÕLç1uœaL£¢1.ÁPÒCÚ5¸žƒA¡‚–K1ÈÄXsæq~·)Æ=ëZâPhqÏ}WßÛ?Mà¥òäú¨Ò±§%7ß|óæ_þò—Ê Rݵk×Ìgžy¦yÅŠÝ€zâ‰'&”s“éèèxeÍš5;‡¢¾mH Geß¾}Ë¥ÑZ»Ë—/ßA E¥ëº¤R)û¾óÎ{ ÕþæÕŒò,tC,u|¶WìÜsÏ=ÖÖÖväĉÊ•ñòË/ÏݰaC|éÒ¥=ôoŒ„¿GÍÕR°? ·Y87¤Œ1ÉéÓ§_¶gÏžj^¸öå2б²º‘À˜žç‹Einjfë¶-üè‡?aý‹/’N§qœ¹çLuœèñxÇu-ü¯·7àºà¹&;€S)ÐŽ%ÅÑà€IuÙ²'Ás›ºÙ¸µ‡M;’ìÚçrôD†=M­,Y²‚K¯YÎ/fñâ…Ìœ9“ñãÇ1fLæ©)cÇŽãÜóÆqîyçJ¥8qâdçÎ]lÞ²M›7óÜó/ò«û·â%ÑÚmšYã=Lv8s¦fét˜>Î0¦Iu<2ž"ãŠX7PJ“r¡!êñ—×u±÷x;ÏîV´Ä+G)½.ß1yñƒŒ1wH,nõ¤Úºôó,…yýë_påÊ•OÝ{ï½×—JtøðáÉ÷Þ{ïô+Vl܇zhN2™l*•þ‚ .xöŠ+®84$5€EvÜ)ôÚµkÛ»ººÚÊ&ÒÚ]ºtéj‰èرc‘d2Yq&ÌXÁ«ã>d÷ª ]ÙU¹¯Pþ™0û³r¥ŠŸk±–KÞþÉ“'«¹sçîØ³gÏ‚rÑŸŽ=:åK_úÒYßþö·å[¬±P¸^¸ÍŸl„FɳÜïÙ³' ¼‘ ƒSµÖjñâÅã7lØ0 ÿüH<Õ^3Ë©îuEþNµ£YûÔZ~òãŸðòŽ~Å`ÕêP ºº ç.iàsïn"7¥ˆ7*p4x‰”áx·Ç«ÓlÞÕǺ]<ób_Ns¢×E;ÍŒ0…¥+–pÁÊóX¾|óçÍ££c---Ùè7§ ±XŒ &0a–,YÂ5׈˜ïêêbÿWÙºu/¼°žuO?ÃKÛwðÔÓG0k{Q&ÍøÆ g΀e³¢,›¡™=Q1±MÓ7D# Qd ¤Ý(“Û]>{Mwü¨‰ã}Ð…<«z¿©ý·çV¬«`0rÞ3{$ Zãy^U"…‘}žåpÖ¬Y³ñÁ|]"‘(:ªçy‘‡~xÁ§>õ©{öì‰oÚ´i%,~ñx¼çª«®Ú‚¼À‡"FyÕ¿A ü½û•}àÀ†T*UÚΧ­­­R¨À ¶mÛÖT©Á⤄{ÝEJåY‘¡òq¯qT™RÇî50Ÿ…ëŶy—\rÉKO<ñĪr³$»®{ôÑGW;vì‰ööö BQοÜþ°ÿ{^Ãõÿñ—¾úê« JÕ#@k­gÏž=˜ƒÊ—>9†ió#dN¸KzÜfçž$/mëá¹Íݼ¸µ—Í»\Ò¦ñãÆÑÞ>Ÿ×œ;%‹qæ™g²dÉb-ZD{û˜ŸiýˆÅbŒ?žñãdzôŒ%¼ñ1~;f×®]³K¥ëèèØó–·¼e7¹n­©‡¸*™_OOãºnÅL‰D`ɨEÙæ¡‡šrüøñ².ä‹¥A ÷jŽ5>'YÖ Ë‚F àÞ¢s/ZT¨ŒB¥_ªì`»û¶·½mû¿þë¿8tèЬr…ìÞ½{Ñ]wÝ5÷ÓŸþô6òÿvKYÚ ëWl §ñî¾ûî+Òét+Uà‹î`6ê ¯`ò½Àš¾.91ŸÒƘ~‘vBÇYa?ŒXá^G\Ï •bݺ§ÑZûV~ï{žAo\å°kï þó›w$Ù¾»—{ú8|ššÛyÍk–³ìÂ…Üô®E,Y¼ˆyóæ2aÂÆWvðèh¡££ƒŽŽ.ºP¿öõöräèQ<Èö—_fëÖí2vË6~z÷V¼¾ŒoSÌcÁ´(ó'iMëå‚ÙšÿÙæ`tÖŠLógT Ï• )]äòzfH^žõ¤êéÝÙçY3sæÌÔE]ôÌž={JΤºoß¾™÷ÜsÏ”7N8qâDG±4Žã¸«V­úÃøñã]×uã8C)Ü+æ=VYÇ]­uYS©çyzÇŽ%ádËVû÷ïw~ðƒ¬r]·ÚîÓî!Q^–¡´]eÑÙäµ,»Ú¼ î«“)¿ò´©â’Žä’·»Ø!á/‹/îYµjÕã?ÿùÏË ÷d2Ù|×]w½aõêÕw­\¹òÅ-êÅÜhÂi¼ßÕí·ß~aggçåê=ct*•rBÇ÷‹dS°ûƒ;ÁÌÚáýnèÓ\ÿºšÐ¾lyVÔ-V¸×#"å¬ìƒ7ê$z»øéáß~áqäDÐ,\¼”w}àZÎ;÷\,˜ÇĉŒ;–ÆÆ²ƒâO›š˜ÖÔÄ´iÓ8묳èîîæØ±c:|„-[¶±ö©u<úûÇøÑ[ˆ9†ñ-Ç9†ë6¡bMî/¯{h[¿é^Ãn4¹ ˜B¿ýH´é«ÉçY ï¶ÛnÛpï½÷:~üøäb 2™LÃÃ?<§³³³ä Öæææ#7ß|óÀ"ѳ”Õ\¸O˜0¡/–eÒó¿ª3Í?Rù>_ )vLèØR|Z71G‚ucLÄ£ý¥–»Ÿ6X‹{=1¦&s™*ZÛÆÐÜâây®ëâf\v¼¼ƒíÛ¶áyžçÑØØÄøñã˜0aÂÿß޹ǹQ\ùþT·¤Ñ¼5¶gŒß0b &ĹöšÇ5á¹`‚!<Øò!Þûá³ Öönn6$$7χÜÝ% ×$!„…½fI ÄNl60ÄÆ&ÄãÏÃöxÞ3šI­®û‡ÔšR©^Ý#ÍŸ¯?²º«Nªni¤_®†ùóçÃâÅ‹aÑ¢E°páB˜5kÔÕÕA]]ÔÔ˜^³5µp]úúú ¯¯Ï[†ššš ¹¹ššš ½½º»»¡··R)B!ˆemÙPQQ!ÛË e[`YÌŸŠ÷lJŒø.µ’¼öÌwQ™`è 7ÜðÎûï¿ÿ_d) d-ËJ­^½z÷dº¼KÒ9sæ¤fÍšu´µµUz=@GGǼ‡~ø³7n|Se§À~ñÅëxà›zzzf ŽR;›b0¥ñ1)+z×EhO˜í1Ã\<Ï?Ëú/؇ÃäÞ{ïýÏ={öœÓÝÝ=OÓ_ä•W^¹þÊ+¯´^~ùå_Ù™Ÿ×½üpS± ?üáç?úè£wvtt|F}”‚QOŒDÇ*+çÇÈ—‹ì„Câž½ 9ñÞ¯„J)%‘׃Â}¼ ð–,\Á$êµ, X„æüRJfo@”J¥ ··:;»àƒöB:‰Î‡ÃaˆÅbÐÐÐõõõÐÐÐ .„ÓN; æÍ›sæÌ††¨©©H„¿¡Üäcddúúú ££Ž9ÍÍÍðñÇCkk+tvvBWWtuuÁÀÀ¤ˆeA$P( ¡P*+«À¶C`Û6+9'„€g¿M€ð¯‡ziHÈFä@f}~&~H]ÊF/¦*&y¦l”çËÝwß}ðŸþéŸö666žë·íܹsï¸ãŽ?CéÏ“÷í¨4¢”Bö–òEÏ%—\²{×®]A·’O¥RÑM›6]þÌ3Ï||ûí··ù˜Gyä´'žxâÆîîî٦㢔Bæ&›c;ælš€Î†2¹×Åúû'žo­aFûµ%Y¡¬|sQJ½Õ¨LóÎ¥~´ʈA6Z,t¥(£@®»îºc[¶lÙô/ÿò/N§•_Š©Tªâ׿þõW–.]:ïÞ{ïÝüÕ¯~µ‰ñÅŠ[>§ìÛ·/úÀüÅ–-[næïyàN›6m¥4ÔÓÓs–ð`(µ‰D„9f^¸»’:Ó_úDÇ¢³=?n토pGLb¬Þ*¥£9ÔüÇ …ŒP'„€KÓy«—X–Ô"`“PæT’‰œ€Ì]DÝ4¤Ó. $ ñàAøÓG7íB(‚šš¨¬¬„êêj¨¯¯‡E‹Á‚ `Þ¼y0wî\X°`Ìž=*++¥‘äRB)…¾¾>hoo‡––hkkƒÖÖVhii¦¦&èéé¡¡!„ÁÁ8¸Ô…p8 ‘p"‘T×Ô‚m‡ d[`Ùöh‹·ð=Íœ[/ý4ïÕ’oNܾ^b>û#"eþ!ŸjkkÓ^xáÏÃÄx¬X±b×i§6 ¥ŸÜLô›Î½óÎ;÷?õÔS-º•:úûûëׯ_sww÷ ÷ÝwßÈ?§lä.Çï~÷»ºÇ{lù¶mÛ.òukx×uíáááÉó“Ç'Áuüë©}ŸfÓ}Lú2Y)HmgÚ‘üÇܵuëÖ 8p¾I·ûöí»ðßøÆ7n|ó‹_üâ»wß}÷ÇÓ¦Mó–x-Ëo~ó›ØO~ò“O¿ùæ›+=ºÔqœ‚‹ÓÂápÿ—¾ô¥ŸoÙ²å¿Ê„;ÇqØ éL#î~~ÐùäQFâ½h»¢=€Â}œ8Ö×çN¯ªÙû—ìì>[&+gE¾KÝÜ <Ÿm¡—jFs¬fs-ÁM§ÁI§¡`ººº ñàAx÷ÝwÁ²,°m;oýôyóæÁÂ… aÉ’%°páB˜;w.TUUAEE”••e¿t"NÃÈÈ C?´¶¶À¡CM°ÿ~hjj‚#GŽ@ww7ôôô€ã8™ÕY²©A¡p"ᄘQ_™Ë)÷VðaÏSî“&{žˆ r.\9F¶–»à¦LB;`ÎùÔ_ßÜϸ§òq³fÍš?¿üòˇUi1³gÏž¥ÝÝݳEÑüÊÊÊ®d2Y)[“›Rj …`lpãë>J¸¤Û¢ömºbQö— ^ôÈ¿RéÇä"`ï»AâK&8Eû4‹Ñ¿ÿû¿~ݺu3:;;êúœùÖ[o]»k×®Õ?þxãܹs›çÎÛ^WW×W^^îô÷÷GŽ92£¹¹yþÑ£GOÇã³Òé´tÉ·3Ï<ó•»ï¾ûÃÍ›7AfC)µ²«[ù‰Ž ]qu&Â\61ЂÑvsP¸—J© £Ë*…|ðÁ¹Oýä_-þC]˜#À¤\'óY äÄ9g›—.¤œT*ánƒ÷Þ{?Å'™´›†úz˜¿`œzê©0þ|X°`Ìš5+—G_UUÑhl{4}Ôqœœ8ïë냶¶6h?rZ†Ã‡Ccc#´µµAOO¤Ói „€mÛYnA(‚h4 –Ûʤ¸°~"ÄÿªjIÎ{î9÷·»g#8ï¢;ª²ûü„æ°L".™]¹re÷§>õ©ü÷yóæí¿êª«ŽÂøœ꺮ÑÅ©¥|ÝÖ­[÷‡;v|¦¹¹Y»ÚK<mß¾ýŠ7ß|ó¢Y³f5MŸ>ýx8Néïï¯êêêšÙÛÛ;Ëqi Cmmí‘[o½õÅçž{îjY¤ŸRjŒŒ„alÇk¼$è…SàþuF¼Ž»*²ëa´Ô£é ¸¾”Ñ_…{ã7Ù¿ÿ³ßûÞ÷¾Çu÷ð ©Tªº½½ýÜöööswîÜÉöaež9sæ;ßÿþ÷_¨©©I…B¡”¦?oª:Ç¢sbU× Ó îc$1*€JæQ}Ž@¢]tÑì}úË¡~RMtâ\VžMxô ´öl´?“ãmMlˆ„#å£ÖÍæÑ»4sQlwo/ttvÂÛo¿ Žã€mÛP[[ Ó¦MƒX,Ó§O‡¹sç¢E‹ ¶¶6³ŽúÁƒpôèÑÜÅ¡===088™*…ÂagóÏ-+“Úb[£é-yË- 4?½ˆ9N‘ –‰káPEÑxOÑ6?‰¢i`jç¸Ã… Ç ¢¢‚\}õÕïïØ±ãÂd2Y¥³/++¼ì²ËÞÎ^”:^ï£~JymÂç>÷¹þûî»ïßî¿ÿþ¹###Fws§¼¥¥åŒ–––3üôU]]Ýñ·û·Ï\sÍ5-/½ôÒj•m___Æø:¸!wfU™¢ç¸Þ͸¯-1ÕM1ºk3!„fSed}™DÛó¶~øá?E£Ñ=öØc·uvvú]í%ox¦†Ó¦MÛóØcýàâ‹/îknn…B¡•ßD"á½Yq­Êmå·ƒ ÌDìƒÄui wC²Ý€*¨Œ0¯€dÄy2ö0d–=Êû©R⺂4S!n’‚À}ÈÄ©¢Nå›BæR¶eØ(ó&x@]œtÜtŽë€ÖÖVpB¡LÎ}(‚T*Éd\×…H¤ "‘p6½¥l+U÷î4J ÄÊ<{¹á¼˜&^‰"ú-Óâc‹XÃۜש‰Æˆ{!îÚµk›~øÃ6·´´h£É ‡n»í¶`tå‰Rc-QTÖ#½nݺßzë­_|ñÅS©TIn6‹ÅÚÖ­[÷ìúõë?:~ü¸Fã*ûx<^žL&!‰”&)0ú:=êíÓvÜ#îܧ‚Feµ©4¿~D:¿Ÿ·}ÿý÷7ÖÔÔüóC=ôß:;;ù‡oêëëÿðÀsíµ×vAV„Û¶íê„{öÂV~âÁ¯gÏn«Îì!²IRDNXážéÍC¯€Œ@¯€ŒH¯‚Q‘žk–}&Ì>»L™HÀ Ôé'•(ªËv˜—b!0ã׆—ùã}8’Øf_Õž?xv¥;‚P8”‹dÓ‚Qúc/ %…J:Ñ&‚6y~$õ…íEb›(ûæ·ù2‘].7žïuœòÂÝq"ºÅu]ö¦6'îœ9s:mÛN9Ž#îµµµGï½÷Þw¡p¢_Jh*•"ª ¥ÔN¥R¥ÝèOúÓmëׯïÚ¸qã•---gÕa,k¿à‚ ~ÿä“O¾vÊ)§$™UWW+oþÔÝÝ]700`•——›.?ÉCÇÕëN§Ku~©ëºÚÕ’É$+B‹Ù·÷÷.%N[àÿ³ÎÄqmÀÀq›É\2î|¿'x׬YstÕªUÿçë_ÿúÞ-[¶\ÞÝݽh¬«£Bh,Ûá…þÛÆ[UUÅ®ÕÕÕiBˆ*Ç’Éd%äŸã BÝ$˜`"âu“#Ä''„pÏþ!U0/z…Ñ<ô0òE9d-ÐÞ^WœÍ¨æu]×Í^ðI)5^yE–JC)'6}¤Ö˜¶ãŧ.o;¯œiËm2v’(µ"åDT&·Þ§dÜŠ4™<[ɘ =[gY@˜÷@ r\ÇX,6P]]}Dö~v'TSSÓ 'HŽ{²gÏžStë=¯\¹ò·+W®ìƒq~ýkjj†c±X["‘¨ÌæÿæA)%‘Hd¨ªª*ãôº}ë[ßÚ{Ë-·ø‡ø‡ó·oß¾¢½½}‰ÉÝN=lÛNÎ;÷à .¸`×í·ß¾ûòË/ïšN§Á¶íÜø/^ܺoß¾vÑšÑétÚ¶m;ÕÑÑjhhPF4UTTT¤êêê:(¥¶mÛ€t:mÇb±ã•••Þù-jŽ{]]]oUUÕ1˲\>m‡RJ\×µb±XJã^QQ‘¨­­=â8N™è½•N§íººº®P(”Оˆ®­­¬®®î „8¢ÏÇqB±X¬;‰8 ?ϲþeÑãQ___ŸúÅ/~±í7ÞøÃÓO?}æo¼±¼µµõÓÉdÒ× #‘HßÌ™3ÿxþùç¿q×]w½ùå—÷‚$ÿ|úôéÇ¢ÑhŒNús㢔†ÊËË»{zzH]]/ÔUk·‹î¨ªŠ¸‹&8ªÉXA9æ·cL3ÃÉ3Óe/õrÒ½ucÕ{T*‡‚ááaXvþ²_oyýõŸÂî(ß·o_u(~§R)kþüùCŸùÌg”) Ÿ ¬ßþö·±ë®»îôööΗUWWùå/ù¿.»ì².ß 9räHx÷îÝ5©TÊ}qRJI8v?ÿùÏ÷ÔÔÔ<ÁرcGõ¦M›Nþýïÿ©Ã‡Ÿ2888-•JU$“É0¥Ô²,+‡G"‘ÈP]]]ǼyóšW¬XñÑu×]×|î¹çä-+˜GSSStïÞ½Õ"ážJ¥¬ÚÚÚÔòåË{ËËËÿMÆãqûwÞ©íïï‰þ.Ç!±X,uþùç÷WVVýüîÝ»·òÀU¡PˆòÇH)%étÎ9çœþ“O>Yuc :;;Ão¿ývLt~2ÇÞÐÐX¶lYÀërmãÖ[nýN"‘¨…ByK#ð_ÞS0±njk÷!šÙaëÖ>ùÑ#H½lb‘«×ü Šô›œ'B$ 8t茌ŒÐÏ/ÿÜÿÛ¼yó/a w0ÿ 9Q> ­¯|å+ñÜsÏýµ*å’K.yþµ×^ûw6<Θ¼n:¶d2 ]]]ßH¾ IDATá={öT{k¢‡™g‘0¦Œêlkœ­JÈS® ¤¬¬,Gâ”Æg°Þó7÷áÕ¶y¹ Ê«°)°clMû`õ¸Ð¿'€=#_]¤:o<º±hë¡ ^—ÛÎGÛ…mEÑýÑÆÎ‚”ã@:íqgΜ٠S_¸# ßúÖ·.9vìØ•Íi§öî]wÝÕùŸ1‚ŒSnR§ ²è¼JЋ¢Ñ²2“‡*_ݤÜįllü1úúCÑ>6&T¸gsÒ dÄ8+Ô+`4=£ùèÞ¬0(çº?T^p›´ñìLÚäê¦M›–,F{»]wu-Zçgz”/ÓH$v²r~IIÑÁŠoÈkÃogl<ÿâHw¾,æÆî-)éC´ëÆ*·Ø'ÊãÖMØ¢4oƒR†tæ&UéSN9¥|è!“òíoû´wÞyç2PLä+**ޝ]»öwY›©œ"… ãû[ŒÏI™@—í›Ö‰¢î®¢Þh—Ù˜´UM4t~Eöº2Ós‡ŒqîÌ Œ,ÈêåYŽÑ†üµÑ½¼tï ^¤›þ!SÆ—Nسõ²m‘Ôçê¦M›–¨‰Å:ZÛÚ2weš°B‚\ f „¶²Üqv_æË$ï\–#¿Ù=娏²s}«¨Lzî8±.›a¤_QÇ¿†Þ±º® CÃÃ@ RV6pÞyçoŸÈ®]»*žx≓ÉdµÊð¬³Îúýƒ>¸ðuGX!éW¼«Ú˜èDv¼°•‰wQ™nÛoA¨ÈF'øuÈÆ+ª×ù@ŠDÉ„;s3#o—(dº÷ðr@EQs—«ãß(&k)²b_4kW n••­Ì=餓óæÌ>üá‡û€R\š†Ê5Uå•Ëöu¹íÒ‹E}ø±aíø¨sª¸ùÇ-ðiy'|Y¡O3?ùÇ!³®?’wŒ…ýyå–E •r >4”ºP«m9ãŒ3ø¼GdêA€~ík_»öرcŸRVVVùÆ7¾ñäßûANtDß~Ŷʯ¬IªHµ¬¡.²S‰kQ=êLÐEÜUþdçC¤Ó„`šÌØ)špÏ^@‚ÑtvùÅä u ™//ïF l¸ÓÛv™}ÖŽpul¹·ÏGØùp*uEáUÑv‘8gíEXçw^ãÖ­[Gœt:šN¥!l3©ú4+ø²­GÓ[x¡H Ûä "u¶ ›Ò’ëƒ0íˆÄ·ÄF%ºórãÎGt\D0¯^7V"ð-*3éŒáÛ*ÒiDýBÀ"  @b8Ô¥pÊÉ'ÿ©¾¾>(ܧ:äú믿ä½÷Þ»RuA*!ĹôÒK_Z³fÍ1Àh;‚ˆËg¡Jœû›DÜE¾uÂ\¶íí‹–TT=D9î )gëÛ× u“s(š˜ %"°pg„º·ÚKd³Í<³B˜}¶œ½‹À¨ð&\™(ê-ÕÀõ§²+8,I¾½*B ëÇ=ÿüóTTTvôõõÍwÝ´ðFLºˆ°jÛÛ7i«ó!²QGáÙù‘¿~MóÛƒ´5õÃþ™ú˯ïï×u! %Ï>ûìýÙ¥ñCn sÇw,ÿÿø[t7[š3gÎ7lØð&àÅÈ"¢T~¢í²r•Xgëe‘l•pæŸM¢¶ª¼zѸDÇ¢«3ó<0Ú^$Œ„;s©—úâ vÙZéÞ›’@~ô;Ï-ŒŠw>ÒͶ÷lMÄ·*z.òÁNt‚Ýø÷ÈëëÒK/íœ^?£±·¯o¾ëRH§Ó`1ë¹—:O]—³.òß ê3Åšþt}™¦Æ¶)N*LýèÒsdǧšœ3°lF†‡¡¯¿\J¡®¶¶é¢‹.jÿ~Èä€ý«¿ú«Ï?ÿüóH$b*ãP(4tà 7ü{öæ@øz#È(üwt1|ÅÎO´]U&Ì¢6"1=ñ®³5™ˆ¨ÎƒÝD¨¯/’E(Ü¡N`4ÍÅìl]® ˆE0påÀ•c+zQYÁm‚îÍ!«WµS vS1ŸëçœOŸó‡æ¦¦Ï§tÔqGÂL »‚ ÍÌ£]æ§@~[’oS'†<›üôÆ–‡8Í…µåÛ@ _O˜ ß–°õÜ8%mXÙ•jDç‰ú󎋎ˆî˯¥ïÙ Î9°ÞÞ^ æÏ›÷ÁòåË»s§"¸×\sÍ^}õÕ›‰DʘBO=õÔmßùÎwvg‹ðË A )Öß…ÎN`ÊÊdúEöìm«Ä¾N4«=¿/Š‚û¯ãdmùñªöóÊewÔEü‘îÙÔ/EÅ»+©·ï=Lfª4ÛŽÍC'PxA)û&aë)³ÏþìC8{")Í6ûÌ׳ý°vü>‹J¸óuîßüÍ×wncÛÁÎãg¦R)ˆ8‡GsÝ…Ñ\FPò6º\nv¿ _m* aNª.Ò'ŠýEÉ•ã{áD@_¯Í‹LPôçÉ‚D" GŽ´“†²²HüÒKW¿UWWçæ:O5ȶmÛªî»ï¾5»wïþK×uùûIÐÐаçG?úÑO³·eÇ×AJK©„;¿¯‹¸ËžME8€úî¤Þç k«Š°ë¢qÊ|ÉŽ'BÙèzFÅ2«´Ø„åáE«è@ԗמßA4¾Îo^E—ùòe¿lÙ²OŸ}öößmÛ¶$í¦íd* áH8¿fŶ©ÂÔ¹/_¡€e› ®Üwc“[UoÒŸ.=I˜b”Ý´m Žwv@|(.u¡®®î£»îºË[?ð&? “ 6|úg?ûÙÚãÇ:èPFõ«_}fõêÕ½€¢AŠMÏO?Â]T.‹j‹¶ƒ wQ?‘uÙDmE>Šõ½T0.Œ¶/âîEU‘e•Ðæ÷E/¾Lè{Ûgk*¸ù¶º1ËŽ u² ƒÈ‡±Ï{î¹ç÷ï¾»ë²þþþSRÉ8"‘ükÛDé)~·µ¶T&¸¾õÂ2ö”â:ÿ´¦í˜õ'jkZoÜ•«à<3Û¶!‘HÀ±£Ç í¤! 'V®\ùúœ9sR€Bn²ã}&º?þøÉ?þñÿ²±±q•ã8U&mÛ¾âŠ+þõ‘Gù°´ÃD?BPe+½*UäY'ØEeºH9_&ÚµS uU½È^´-³aÑé9Ä'£ ‰«Å([/¤|½Hà«„½ŸVdË^Èj:&ÑD…-W ~Ù¤@<Ž<®¼òÊãçœsÎkoüç÷¤Ý4ŒŒŒd„;aD Hn[d£µ•øå#˼r>oœK—Q]´É ö¼|ðَܸ ÆÊÕ³eÞøu~D©1Fç”í#7v¶ždχÇÃàà ̘QÿÁƒnx 0·}Ò³sçÎÊM›6Ííµ×>ûÑG­ŠÇãsLÛBœÏ~ö³?þùç·–rŒò ¡˜¢ÎÔWÐÈ».Ú$êÎnÝçSeDã7©ÙóÇ(k#³CŠ {q*/fÙr‹)7ÞlŽ;0mçïƒ}fÇ%zx>dëÁS-_PxlüñˆöÁ Œ'góÈ#¿~ÓM7×ÞÞ~A"9CÃ!¨ª¬5ÌÁêå_@ÉÖƒ ¾0:,¬ÒFÓ^;¹Øgv@9ž‚6>Æ/ò#<§9A.™ ä¥ÈØÐÓÛÍMMvÓPVVÖwóÍ7=»dɩÀl“rï½÷^õÇ?þqM*•ªñÕgéÒ¥/ìØ±ã9."RH)þNüF’uå~Å»êY%êE"[VçÇFg+*×#¿Œ!B¥”òeþ…‘‰T^ ³6¬ –µ#PøR‹ïSÛ¿h¬²r"/²!Ë—/øò—¿üó'Ÿüñ§’©dõðÐD"(++JižÏ°ñ;†ú@§ |ê£ÿÙza=!ò%Å¢~lçDÖ_P!L¥àãƒaxx€,Y²ä•õë×ïL‘™ XõõõºµÙ YVò¼óÎûÙ¯~õ«ç 󷎯5‚L*]à§Nu={Û²}p—•«|èìùq¨&'ªr?ítuHøå YAËG¥yD6"q.‹jëET¯kÏ— \Ô†ŸD°íT"]w|^ûè£î~õÕ×_ûè£?]ç8i2Ð?ái!…ÂñžsH ·)#™maþº(MbUÐ*O>XÞ8c¯˜(è„4HŽÉï±(s÷©¤^ô@þñúøtww¥Nš9s×£ßùÎ Ñh/H¸W]uÕÛ·o?ǘ4ˆD"+V¬xvëÖ­/—zp‚äúyj"Pev:±®²m{û~nÈ$óË߀ 8™çíE>Tðº¿çJ{Q§É‹éç d:ô;ƒ-{¤z¸ÌCæG´-j'ó#²= Æ÷È#=7cÆô÷(¥L&a`` {GÕL.¸÷œyî‘©µ!v…u£>(ç¸>ù¾ó Š2ú›ÅŒÑâÊ,È?K äólÿ¢íÂ2’7.‹ˆÆï¯Þ²,…lhiiÖÖp] ee‘Þo¼áÿ^tÑE}Þ»ø˜˜‡{ÓM7µOŸ>ýÏ`@MMÍ[n¹åÑ­[·nšcÇ>¦âƒýŽT}‡j¿S>uíLü™ÚðÛü³ªpå Øn›÷%²c÷EíUýˆÚˆöem²Q6‚+Ê o9H êH5»ÍÖS® ðh4oËæ­{oß›U²uì˜øüxÑqðÇÂŽ‹÷Ç׉lùãEõ ŽýÚk¯=ÞÙÙùÝ|ðöõõÇ ®®,+¡O»ª/úTG­umdí3Û£ö:þûS·õ•:cP/;fYõ¶7q± µµ öïߎ“‚P(4tñÅ?ùè£ßÛ“5Ç®)Bmm-œ~úéï·´´\L)Þ¨.÷œ}öÙ›6lذéšk®éLA± ÓÅìǤLT®«¼H‰cþÙT°Ëêek½‹ÊTõ<²ãôûÚàw^ ~!1°H*!*Á:Á®úe}ÈD³ªŽ_e†g'š€ð~d“Ñd@d'¢`Rt÷w´ïß¿ÿ?õ“ŸüÁ“ãq ‹Å ΤÍÉS®^zQeÖÖ5i¤¿ yåʱHÆ`*Ðue–eëºÐ|ø46ÇIeÛβeËžÞ´iÓf@¦"îW\±{Û¶m=©Tªž­°m{pöìÙ;Ö®]û↠>ª®®–}ù!"F¦ ŠõwdêGe§›.²m*ØEe*ñí•óÓ‰€èXT>T¿^x×ÔâA²÷F™EÑlÑë³4vAÚûÙç·Ùcá×yçU´Í‹}Ó2SȺuë–>ýôÓÏ´, ¢Ñ(LŸ>ÊÊÊòY{Ù¶Ê;o[7~‘å¸teõ¹}ϼmÈvÛ¶add„ææfH§Ó`[ÖÈÒ¥K7nß¾}cyy9~PMQ¬E‹}÷øñãË F;êëëÿ¸jÕª-?øÁvÕ××;=F9Á VØtBžŸp˜D¦UâY%æùœwQtÝçëÙ}Õ]Xe¾eõ²1¨ž0]¦H°ÂÀ\´äße5¨0çý©úA=¶ƒ<ƒá¾©IÐ~íÚµ+6¿úê½ñx|>@4…Xm-TUW!$wѪ0 œÙÉ/SD‹Y{‘­È_þòüeÛ˜úÓö§ic46Õ˜ø²ìäÉË»ïëëƒ?ïßÇŽË^›`œ{î¹Oÿê•W~^__ëµOqV¯^}åûï¿ñÉ'Ÿüþ…^¸ëþûïo̾®ø„ ÅC/E?~êüFÝùm•PçŸuÂ]$¦UBÚ±/Õƒm+ó+›ê¸Q´ÍáÔ‰a•°ö#ÄuÂ_ÕFe/{‰t‘ø6ä2;*¨g·ù™¾ òío{áã?úÑïìêº Ù­¬¬„X,g”ˆK‘P¦ªzAÔY&®óê} e¥0fÆDÌ«Žß­î\åìH推CCCÐÜÜ ÍÍÍ022„ˆF£í«V®üç_mÞüZ¶)~PMq:::B###dþüùºœ œRwÖÿ]ÌoËúÖ•‰„¼LÜ«"îì¾LÌ›î›s?íuc‘KÁ6Š÷âÀ w¯L'–u¢@q„¾j_46ð±¯Ú6í*[ÓöB»_ÜT÷Àß¼­©éЗÒét€P8 555‹Å ‰ä.^Í[:R”"x–•©ÚË·i™Î·Ÿú ¶Þ/–eåÎu2™„¶¶68|ø0 @:˲ܺºiïÝxãÚ?þøã{AñC©…{Ð6~¢ðºr“g?x]êŒßˆº‰°õ§:¦¼mîÅA&ÜÌÒStÂ[%úMĹÉd4u2{Þ†·õ¶½èö[¯À÷÷÷[×\sÍ•ï¾ûîÍCÃçxQöH8 µµµPUUåååyË%ÊD¼2"n(nƒâb—ew2/ˆ¨žIgaËò^Tƒã`Åz:†øÐt?ííí¹õÙ)¥‡{/^üÒ÷¿ÿýŸ_vÙe}€ ‚L$¢ïV`TիļnÛ¤L%ÖƒFÝä©2|H¨ËÒtDýðõÂcEÑ^H´-3ñò…³Wç'¯‹Èë"ð¼O¿kÉ£pŸ@XážÛ¹0 o~Ÿ·W }Ó‰n,¢gÞŽ¯“µùà "ÒEeº72;>ºaÆEÏ?ÿüU---_H$'yÂÜ[Ý$Cyy9”••A$H$¡P(A6M?ñöUâZäÇïD@æ;ˆp× {I?®ë‚ëºà¤R0<2###Ç¡¿¿††† ™L‚ãŒ.bYÖÈÌ™3·®X±âÕo~ó›ï/[¶lpýnARâGôñß­A£Id]d/›èÒITv~¢ñ¦‚ÝᆰoÑñä•¡p/žp·AœܳH”—rßÏX@`cR&Ú— ó "Þ¯ÈWú:~ü¸õì³Ïžôì³Ï^xèСUñxüôt:]ÉÞ$ÆÝ죔Êïx÷諒PJsBž­¶m{(‰khhxëâ‹/þÍý÷ßÿáé§Ÿžòê‹2A¤øùŒ6‰º‹êtb]TæW¸›lãì—žh_Ýçë³Cá^dwo[ÙÖ¥ºø‰Èƒm¾LÔ—èXLëARnª‹7âã?ŽüÝßýÝÒ>øàÌŽŽŽ3†††Nv'æ8N•ëºQÙ)Ô¶í˲†lÛî///?RWW÷çÅ‹ïùò—¿üÁwÞy|¢ˆ ‚ " MÚ˜ˆye´YQ®K=Q¥£ðé6~/^•Õ‰|ÉìEãµïÅ‚¸‹"צ‘nÐ {¿ Ϻ2ѾŸh»ªÜ„b„Œ d#ñÛ·o¯Þµk×´¶¶¶ÚžžžÊ¡¡¡òT*ʾ¾ˆBˆ …Ò‘H$‹Åâ K–,é^µjUßYg•€ÑŸ^ñCAdòô³Z—£*²­‹ÈûIQQ]PêçbS?i2¢}ÑØ…{±à…;@¡xæËDuAÄ|PŸ&Ï~ÊDûªr•Ø.vîˆ&ljÈ1úàAAÆ £“RöaZ$uFiçëuÂÞo.bîW°›ŒSÔP¸ ]*ûGË@¶Lµ ÿ‡'Ú–Õ³ðåª?f¶N4vÖÖëCV'«÷Ì,™?G2¿ø ‚|Ò`¿‹¡nb#j£î¢rÙ³·­ò&ý˜ü BVïë5¡”ïcÇ$Z$Êu¢ÝD¼‹ìEÂWõ†QM&X?¼ˆW‰oÞŸÌN'öuoNS!®úcFAO:¦ß{ňÐö&B]dg™×EÛeö¦“]™l¿Ô¿† DÂ]Ý• u€B‘Ì—±¹Âl Œ—«‰hÝD‚µWM$x¿¢ êMĹ â‚ R\tÂÛDlú­u×m넽©¨— x]{L”™Œ¶V¸ë"Ø|½ßè»LxûÁ4F„,Ú¯²åûÕû‰ºcÎ9‚ ‚”“èx1Úðõ*Qob'Ùº_áM"æºr•M`# õ K•‘‰tÕ>€\ÈËf¹¢È>ßÞ/¦¹ï²¾d¤úù(E:Š~AäD¥"p¬"Ô$òΖëD½Jä›îö¥8¿yÚ sÜ‹ƒßu¾UQj™­.²­ºèT–’Ã×ÉÆ¨»èÕô‚W•¨Ø UAäD¡TB¯Xé A½itÜÄÎä?Ñòb—P´^¸ëÒeØ}àõ{Ñ‚¬oÖ—(ÍE&ôAb£³ Sá\LÍ_€ ‚ ' ¢ `1àx w¾Ì϶*ZoM×EóA)%(àÇŠŸˆ{Q/» T–û.Ò*ÑíùQõËd¢a2)懊G©ÊBAÉLQ„£ÿ õ"?û*q.+7í¦ãQÔó‚½8¨V•Ñ•ÉêeÛì¾Làˆß(*ï•«úUWUæÙØ1ZŽ ‚ G)£ô&¢ØD¸óûªh¼iTŸ·Õõå÷<ÛcŽ{qšã®ɲ;Hû‰–³ÑvUSá,šHðu²z•O¿iC‚ ‚ ßÁc‰ÄÀñ¢2•°7ë%Ñ,(ÞÇŽJ¸ËÄ®L¼{¨D´jU]Û^µÂ¨Óœ|¾?AD8FÛAdâ*MÛ5êÎïÈû­3í[5dÑEÜMS`tmDbŸ·—µ0› ˆ„·lb¡zÓªD¶_Ñ^ŠœwAA‚SÌt Qy?i.:•½ ²è|P¿¨wJŒé:î²ra/k#Šxó‘u•æûQ tѱ™ˆlÕ˜Líe`TAA‚Q,ÁXÌ”š ©4A¢á²ö¦i6AA‘>xÂÝ4‚®«W ~U„\U¯»˜Õ$ Çd•LÓjü ;Ï‚ ‚ä# Ëw1lÇš6£Û7Mg1íc‰Þ#ã€éÅ©¼8g1Y_ÕÏR‹ª4“œz•¨– c¿åÅ~CcJ ‚ ‚ø§”Â]էߺ ÑwY™It^%ÒýDâMƆŒ#A.N•ÙùI£‘áGÀÓÖä—ÞW±Áˆ;‚ ‚ø§ÔQb¿AmL…¾i4ݯ`Wµñ;Ù˜"B(¥è£Îª¼pS;Yꊮί­¬?mLý Y*‚ ‚ rJuŸè¼wU[¿bÜÔÖO_¦¾ðFLc„¸ûÉeW!KYÑ­þ¢J‘ÙÊ-'ÉÖÉi/õ›m"~òCA©Šß(p±ú«}HûXÊMü›ˆv?¾‘ÀFÜóÊd¶ Y½[S›REØÇ3ÒQuA) ã-"ý f“v&:ˆMÐ4?6ÊrŒº'¨p}?vA„¼ŸúbµAAdòSÌèúXm‚Fáýú2ñ;Ö‹lQ´‘b wQ¹ßȺ;¿¶*‚Špï‚ òɤâÝ´ßÕ\üŠö “b¤þŠ÷± î¹rU[?é2~ËLëƒÖ•ü‚ RZ&RM ÚÖpöe×ÉwN< ÷àø½sªWL½l%Õ‹"ºSvQæXVZ‘!È ÅÛø†EA©E1#êAÚ•:Õf,ý"ã„q'à?Ú]¬›•êBÒb mŒ#‚ ȉM±ìX¢ò:¿¼”…0âÝSýDÞMËù:Q¹(/ë_„iDÝTã AAJ_ê%"ƒ¶AÆ]Ä=ÏÎÄW‘Ú™´K|¼"è©GAÉÇd[ó=ˆbçÉ›¶S{Œ¶ þLêè¶îMÅŠœ«Pý c¼n¤äoNAA&jyI{?~0?ÁˆRe‚¤ÇÈìx[!/³µ3}ƒŒ‡`Çè:‚ ‚L]ÆCtNô®A}¢`Ÿ$YUÆ« o+²½Ð~}ÊPMŠMUjA™<Œ÷÷x1û+E„¾”~‘€°9îJS_AÇPBûR1YÆ ‚ Hñ™L‚´Ôè›Ö ¶IDAT¼ië»Ìo;&Â]Ú®„öãío²÷‹ ‚ ÈÄ1Q‚³TýŽ[ÊŠõâT¸ ýL@ÛR3™Ç† ‚ ÈÄ1™éXÇV”cCÑ^|r´â=Ïß$ó… ‚ òI¤Xâ¸h"{éŠã" ù@}O“i,‚ ‚Lm&“p-éXP¤/ë8ûb2•ÆŠ ‚ È'—)%tQ˜O.¦Œ bAA¢ƒBúÄæÿpˆ®k@IEND®B`‚pyramid_zcml-1.0.0/pyramid_zcml/scaffolds/starter_zcml/+package+/static/headerbg.png0000644000175000017500000000031311736362264030543 0ustar tseavertseaver‰PNG  IHDR4b·Ît’IDAT8í“AÄ C“\«—›SÏn`b‹íºà)4ÁoŸàû9DRp‘hµÈ¯«×uìô½?÷Þ²‡ ”@»÷¬\SÍ=ýÌ®Š3}½÷­¾ÚOÜÕÜåo¼±FŸ5´9,×cå©ïß»'çãmZó&kÌéä… ´q~øx²Xò5†èßE3˜,óçû÷”01]îsÖIEND®B`‚pyramid_zcml-1.0.0/pyramid_zcml/scaffolds/starter_zcml/+package+/static/footerbg.png0000644000175000017500000000051511736362264030615 0ustar tseavertseaver‰PNG  IHDRfÍÉÙIDAT8…“É‘Ã0í¬œZ샔%[®Ú‡Šâ58äù| X0`©‡˜Ôáÿo©„qNG@Å™Ï;mH#©¡¦8‰áÎáàKkƒÜ8FèOž-«&19çÀZ#¸ÆA¢dF\gƒ/8ñŠML—¦Gpº8ûdk躓à€éâ}œ}ºôts¾ìóœùe.¾uõ9dë=|úî÷¢­üð9àëðèè­óÉM÷êíÂþÖÓ±}ÈæÕ»æ™ëÁk>öÿ½´þÎÆÕ;«t.k~äí!;?ÀÛŸîZ¢Ôq‚–ÜYÁ:ßîw·óuËmMŽ|¬<äÈì¡ñ+3ëÝ9ðípâ-nù³V=F|˜IEND®B`‚pyramid_zcml-1.0.0/pyramid_zcml/scaffolds/starter_zcml/+package+/static/favicon.ico0000644000175000017500000000257611736362264030432 0ustar tseavertseaverh( " A>;)'%+¯ô=¿ö420520ÿÿÿ;96¸èú „„†µäô—àúGDA/-+LHF+©é\XUtØùååæììì,BO/Vi531WSP+®ñ·çø§§©OÏù--..-.QNK       #!!!!!!"   $$$$$$$$$$$$$$$$À€€Àpyramid_zcml-1.0.0/pyramid_zcml/scaffolds/starter_zcml/+package+/configure.zcml0000644000175000017500000000052311736362264027660 0ustar tseavertseaver pyramid_zcml-1.0.0/pyramid_zcml/scaffolds/starter_zcml/+package+/tests.py_tmpl0000644000175000017500000000062011736362264027556 0ustar tseavertseaverimport unittest from pyramid import testing class ViewTests(unittest.TestCase): def setUp(self): self.config = testing.setUp() def tearDown(self): testing.tearDown() def test_my_view(self): from {{package}}.views import my_view request = testing.DummyRequest() info = my_view(request) self.assertEqual(info['project'], '{{project}}') pyramid_zcml-1.0.0/pyramid_zcml/scaffolds/starter_zcml/CHANGES.txt_tmpl0000644000175000017500000000003411736362264026131 0ustar tseavertseaver0.0 --- - Initial version pyramid_zcml-1.0.0/pyramid_zcml/scaffolds/starter_zcml/development.ini_tmpl0000644000175000017500000000125211736362264027346 0ustar tseavertseaver[app:{{project}}] use = egg:{{project}} reload_templates = true debug_authorization = false debug_notfound = false debug_routematch = false debug_templates = true default_locale_name = en [pipeline:main] pipeline = {{project}} [server:main] use = egg:pyramid#wsgiref host = 0.0.0.0 port = 6543 # Begin logging configuration [loggers] keys = root [handlers] keys = console [formatters] keys = generic [logger_root] level = INFO handlers = console [handler_console] class = StreamHandler args = (sys.stderr,) level = NOTSET formatter = generic [formatter_generic] format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s # End logging configuration pyramid_zcml-1.0.0/pyramid_zcml/scaffolds/starter_zcml/README.txt_tmpl0000644000175000017500000000002611736362264026017 0ustar tseavertseaver{{project}} README pyramid_zcml-1.0.0/pyramid_zcml/scaffolds/starter_zcml/setup.py_tmpl0000644000175000017500000000176011736362264026041 0ustar tseavertseaverimport os from setuptools import setup, find_packages here = os.path.abspath(os.path.dirname(__file__)) README = open(os.path.join(here, 'README.txt')).read() CHANGES = open(os.path.join(here, 'CHANGES.txt')).read() requires = ['pyramid', 'pyramid_zcml'] setup(name='{{project}}', version='0.0', description='{{project}}', long_description=README + '\n\n' + CHANGES, classifiers=[ "Programming Language :: Python", "Framework :: Pylons", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: WSGI :: Application", ], author='', author_email='', url='', keywords='web pyramid pylons', packages=find_packages(), include_package_data=True, zip_safe=False, install_requires=requires, tests_require=requires, test_suite="{{package}}", entry_points = """\ [paste.app_factory] main = {{package}}:main """, paster_plugins=['pyramid'], ) pyramid_zcml-1.0.0/pyramid_zcml/tests/0000775000175000017500000000000012113677651017755 5ustar tseavertseaverpyramid_zcml-1.0.0/pyramid_zcml/tests/defpermbugapp/0000775000175000017500000000000012113677651022576 5ustar tseavertseaverpyramid_zcml-1.0.0/pyramid_zcml/tests/defpermbugapp/__init__.py0000644000175000017500000000065711656047135024714 0ustar tseavertseaverfrom webob import Response from pyramid.view import view_config @view_config(name='x') def x_view(request): # pragma: no cover return Response('this is private!') @view_config(name='y', permission='private2') def y_view(request): # pragma: no cover return Response('this is private too!') @view_config(name='z', permission='__no_permission_required__') def z_view(request): return Response('this is public') pyramid_zcml-1.0.0/pyramid_zcml/tests/defpermbugapp/configure.zcml0000644000175000017500000000043011656047135025440 0ustar tseavertseaver pyramid_zcml-1.0.0/pyramid_zcml/tests/viewdecoratorapp/0000775000175000017500000000000012113677651023333 5ustar tseavertseaverpyramid_zcml-1.0.0/pyramid_zcml/tests/viewdecoratorapp/__init__.py0000644000175000017500000000001211656047135025432 0ustar tseavertseaver# package pyramid_zcml-1.0.0/pyramid_zcml/tests/viewdecoratorapp/views/0000775000175000017500000000000012113677651024470 5ustar tseavertseaverpyramid_zcml-1.0.0/pyramid_zcml/tests/viewdecoratorapp/views/__init__.py0000644000175000017500000000001211656047135026567 0ustar tseavertseaver# package pyramid_zcml-1.0.0/pyramid_zcml/tests/viewdecoratorapp/views/templates/0000775000175000017500000000000012113677651026466 5ustar tseavertseaverpyramid_zcml-1.0.0/pyramid_zcml/tests/viewdecoratorapp/views/templates/foo.mak0000644000175000017500000000003111656047135027732 0ustar tseavertseaver ${result} pyramid_zcml-1.0.0/pyramid_zcml/tests/viewdecoratorapp/views/views.py0000644000175000017500000000045711656047135026202 0ustar tseavertseaverfrom pyramid.view import view_config @view_config(renderer='templates/foo.mak', name='first') def first(request): return {'result':'OK1'} @view_config( renderer='pyramid_zcml.tests.viewdecoratorapp.views:templates/foo.mak', name='second') def second(request): return {'result':'OK2'} pyramid_zcml-1.0.0/pyramid_zcml/tests/viewdecoratorapp/configure.zcml0000644000175000017500000000017211656047135026200 0ustar tseavertseaver pyramid_zcml-1.0.0/pyramid_zcml/tests/exceptionviewapp/0000775000175000017500000000000012113677651023347 5ustar tseavertseaverpyramid_zcml-1.0.0/pyramid_zcml/tests/exceptionviewapp/models.py0000644000175000017500000000040711656047135025202 0ustar tseavertseaver class NotAnException(object): pass class AnException(Exception): pass class RouteContext(object): pass class RouteContext2(object): pass def route_factory(*arg): return RouteContext() def route_factory2(*arg): return RouteContext2() pyramid_zcml-1.0.0/pyramid_zcml/tests/exceptionviewapp/__init__.py0000644000175000017500000000001411656047135025450 0ustar tseavertseaver# a package pyramid_zcml-1.0.0/pyramid_zcml/tests/exceptionviewapp/views.py0000644000175000017500000000046212102046536025044 0ustar tseavertseaverfrom webob import Response from .models import AnException def no(request): return Response('no') def yes(request): return Response('yes') def maybe(request): return Response('maybe') def whoa(request): return Response('whoa') def raise_exception(request): raise AnException() pyramid_zcml-1.0.0/pyramid_zcml/tests/exceptionviewapp/configure.zcml0000644000175000017500000000214611656047135026217 0ustar tseavertseaver pyramid_zcml-1.0.0/pyramid_zcml/tests/test_integration.py0000664000175000017500000001640112102053206023671 0ustar tseavertseaverimport os import unittest class IntegrationBase(unittest.TestCase): root_factory = None def setUp(self): from pyramid_zcml import includeme from pyramid.config import Configurator config = Configurator(root_factory=self.root_factory) config.include(includeme) config.begin() config.load_zcml(self.config) config.commit() app = config.make_wsgi_app() from webtest import TestApp self.testapp = TestApp(app) self.config = config def tearDown(self): self.config.end() class TestFixtureApp(IntegrationBase): config = 'pyramid_zcml.tests.fixtureapp:configure.zcml' def test_another(self): res = self.testapp.get('/another.html', status=200) self.assertEqual(res.body, b'fixture') def test_root(self): res = self.testapp.get('/', status=200) self.assertEqual(res.body, b'fixture') def test_dummyskin(self): self.testapp.get('/dummyskin.html', status=404) def test_error(self): res = self.testapp.get('/error.html', status=200) self.assertEqual(res.body, b'supressed') def test_protected(self): self.testapp.get('/protected.html', status=403) class TestCCBug(IntegrationBase): # "unordered" as reported in IRC by author of # http://labs.creativecommons.org/2010/01/13/cc-engine-and-web-non-frameworks/ config = 'pyramid_zcml.tests.ccbugapp:configure.zcml' def test_rdf(self): res = self.testapp.get('/licenses/1/v1/rdf', status=200) self.assertEqual(res.body, b'rdf') def test_juri(self): res = self.testapp.get('/licenses/1/v1/juri', status=200) self.assertEqual(res.body, b'juri') class TestHybridApp(IntegrationBase): # make sure views registered for a route "win" over views registered # without one, even though the context of the non-route view may # be more specific than the route view. config = 'pyramid_zcml.tests.hybridapp:configure.zcml' def test_root(self): res = self.testapp.get('/', status=200) self.assertEqual(res.body, b'global') def test_abc(self): res = self.testapp.get('/abc', status=200) self.assertEqual(res.body, b'route') def test_def(self): res = self.testapp.get('/def', status=200) self.assertEqual(res.body, b'route2') def test_ghi(self): res = self.testapp.get('/ghi', status=200) self.assertEqual(res.body, b'global') def test_jkl(self): self.testapp.get('/jkl', status=404) def test_mno(self): self.testapp.get('/mno', status=404) def test_pqr_global2(self): res = self.testapp.get('/pqr/global2', status=200) self.assertEqual(res.body, b'global2') def test_error(self): res = self.testapp.get('/error', status=200) self.assertEqual(res.body, b'supressed') def test_error2(self): res = self.testapp.get('/error2', status=200) self.assertEqual(res.body, b'supressed2') def test_error_sub(self): res = self.testapp.get('/error_sub', status=200) self.assertEqual(res.body, b'supressed2') class TestRestBugApp(IntegrationBase): # test bug reported by delijati 2010/2/3 (http://pastebin.com/d4cc15515) config = 'pyramid_zcml.tests.restbugapp:configure.zcml' def test_it(self): res = self.testapp.get('/pet', status=200) self.assertEqual(res.body, b'gotten') class TestViewDecoratorApp(IntegrationBase): config = 'pyramid_zcml.tests.viewdecoratorapp:configure.zcml' def _configure_mako(self): tmpldir = os.path.join(os.path.dirname(__file__), 'viewdecoratorapp', 'views') self.config.registry.settings['mako.directories'] = tmpldir def test_first(self): # we use mako here instead of chameleon because it works on Jython self._configure_mako() res = self.testapp.get('/first', status=200) self.assertTrue(b'OK' in res.body) def test_second(self): # we use mako here instead of chameleon because it works on Jython self._configure_mako() res = self.testapp.get('/second', status=200) self.assertTrue(b'OK2' in res.body) class TestViewPermissionBug(IntegrationBase): # view_execution_permitted bug as reported by Shane at http://lists.repoze.org/pipermail/repoze-dev/2010-October/003603.html config = 'pyramid_zcml.tests.permbugapp:configure.zcml' def test_test(self): res = self.testapp.get('/test', status=200) self.assertTrue(b'ACLDenied' in res.body) def test_x(self): self.testapp.get('/x', status=403) class TestDefaultViewPermissionBug(IntegrationBase): # default_view_permission bug as reported by Wiggy at http://lists.repoze.org/pipermail/repoze-dev/2010-October/003602.html config = 'pyramid_zcml.tests.defpermbugapp:configure.zcml' def test_x(self): res = self.testapp.get('/x', status=403) self.assertTrue(b'failed permission check' in res.body) def test_y(self): res = self.testapp.get('/y', status=403) self.assertTrue(b'failed permission check' in res.body) def test_z(self): res = self.testapp.get('/z', status=200) self.assertTrue(b'public' in res.body) from pyramid_zcml.tests.exceptionviewapp.models import AnException from pyramid_zcml.tests.exceptionviewapp.models import NotAnException excroot = {'anexception':AnException(), 'notanexception':NotAnException()} class TestExceptionViewsApp(IntegrationBase): config = 'pyramid_zcml.tests.exceptionviewapp:configure.zcml' root_factory = lambda *arg: excroot def test_root(self): res = self.testapp.get('/', status=200) self.assertTrue(b'maybe' in res.body) def test_notanexception(self): res = self.testapp.get('/notanexception', status=200) self.assertTrue(b'no' in res.body) def test_anexception(self): res = self.testapp.get('/anexception', status=200) self.assertTrue(b'yes' in res.body) def test_route_raise_exception(self): res = self.testapp.get('/route_raise_exception', status=200) self.assertTrue(b'yes' in res.body) def test_route_raise_exception2(self): res = self.testapp.get('/route_raise_exception2', status=200) self.assertTrue(b'yes' in res.body) def test_route_raise_exception3(self): res = self.testapp.get('/route_raise_exception3', status=200) self.assertTrue(b'whoa' in res.body) def test_route_raise_exception4(self): res = self.testapp.get('/route_raise_exception4', status=200) self.assertTrue(b'whoa' in res.body) class TestIncludeOverrideApp(unittest.TestCase): config = 'pyramid_zcml.tests.includeoverrideapp:configure.zcml' def test_it(self): # see http://www.mail-archive.com/zope-dev@zope.org/msg35171.html # for an explanation of why load_zcml of includeoverrideapp's # configure.zcml should raise a ConfigurationConflictError from pyramid.exceptions import ConfigurationConflictError from pyramid_zcml import includeme from pyramid.config import Configurator config = Configurator() config.include(includeme) config.load_zcml(self.config) self.assertRaises(ConfigurationConflictError, config.make_wsgi_app) pyramid_zcml-1.0.0/pyramid_zcml/tests/test_units.py0000664000175000017500000015121612102053205022513 0ustar tseavertseaverimport logging import sys logging.basicConfig() import unittest from pyramid import testing from pyramid.renderers import null_renderer from zope.interface import Interface from zope.interface import implementer class TestViewDirective(unittest.TestCase): def setUp(self): self.config = testing.setUp(autocommit=False) def tearDown(self): testing.tearDown() def _callFUT(self, *arg, **kw): from pyramid_zcml import view return view(*arg, **kw) def test_with_dotted_renderer(self): from pyramid.interfaces import IView from pyramid.interfaces import IViewClassifier from pyramid.interfaces import IRendererFactory from pyramid.interfaces import IRequest reg = self.config.registry context = DummyZCMLContext(self.config) def factory(path): def foo(*arg): return 'OK' return foo reg.registerUtility(factory, IRendererFactory, name='.pt') view = lambda *arg: None self._callFUT(context, 'repoze.view', IDummy, view=view, renderer='foo/template.pt') actions = extract_actions(context.actions) _execute_actions(actions) regview = reg.adapters.lookup( (IViewClassifier, IRequest, IDummy), IView, name='') self.assertEqual(regview(None, None).body, b'OK') def test_with_custom_predicates(self): from pyramid.interfaces import IView from pyramid.interfaces import IViewClassifier from pyramid.interfaces import IRequest from pyramid.registry import undefer reg = self.config.registry context = DummyZCMLContext(self.config) view = lambda *arg: 'OK' def pred1(context, request): return True def pred2(context, request): return True preds = (pred1, pred2) self._callFUT(context, 'repoze.view', IDummy, view=view, custom_predicates=preds, renderer=null_renderer) actions = extract_actions(context.actions) self.assertEqual(len(actions), 1) discrim = undefer(actions[0]['discriminator']) self.assertEqual(discrim[0], 'view') register = actions[0]['callable'] register() regview = reg.adapters.lookup( (IViewClassifier, IRequest, IDummy), IView, name='') self.assertEqual(regview(None, None), 'OK') def test_context_trumps_for(self): from pyramid.interfaces import IView from pyramid.interfaces import IViewClassifier from pyramid.interfaces import IRequest from pyramid.registry import undefer reg = self.config.registry context = DummyZCMLContext(self.config) view = lambda *arg: 'OK' class Foo: pass self._callFUT(context, 'repoze.view', for_=Foo, view=view, context=IDummy, renderer=null_renderer) actions = extract_actions(context.actions) self.assertEqual(len(actions), 1) discrim = undefer(actions[0]['discriminator']) self.assertEqual(discrim[0], 'view') self.assertEqual(discrim[1], IDummy) register = actions[0]['callable'] register() regview = reg.adapters.lookup( (IViewClassifier, IRequest, IDummy), IView, name='') self.assertEqual(regview(None, None), 'OK') def test_with_for(self): from pyramid.interfaces import IView from pyramid.interfaces import IViewClassifier from pyramid.interfaces import IRequest from pyramid.registry import undefer reg = self.config.registry context = DummyZCMLContext(self.config) view = lambda *arg: 'OK' class Foo: pass self._callFUT(context, 'repoze.view', for_=IDummy, view=view, renderer=null_renderer) actions = extract_actions(context.actions) self.assertEqual(len(actions), 1) discrim = undefer(actions[0]['discriminator']) self.assertEqual(discrim[0], 'view') self.assertEqual(discrim[1], IDummy) register = actions[0]['callable'] register() regview = reg.adapters.lookup( (IViewClassifier, IRequest, IDummy), IView, name='') self.assertEqual(regview(None, None), 'OK') class TestNotFoundDirective(unittest.TestCase): def setUp(self): self.config = testing.setUp(autocommit=False) def tearDown(self): testing.tearDown() def _callFUT(self, context, view, **kw): from pyramid_zcml import notfound return notfound(context, view, **kw) def test_it(self): from zope.interface import implementedBy from pyramid.interfaces import IRequest from pyramid.interfaces import IView from pyramid.interfaces import IViewClassifier from pyramid.exceptions import NotFound from pyramid.registry import undefer reg = self.config.registry context = DummyZCMLContext(self.config) def view(request): return 'OK' self._callFUT(context, view, renderer=null_renderer) actions = extract_actions(context.actions) self.assertEqual(len(actions), 1) discrim = undefer(actions[0]['discriminator']) self.assertEqual(discrim[0], 'view') self.assertEqual(discrim[1], NotFound) register = actions[0]['callable'] register() derived_view = reg.adapters.lookup( (IViewClassifier, IRequest, implementedBy(NotFound)), IView, default=None) self.assertNotEqual(derived_view, None) self.assertEqual(derived_view(None, None), 'OK') self.assertEqual(derived_view.__name__, 'view') def test_it_with_dotted_renderer(self): from zope.interface import implementedBy from pyramid.interfaces import IRequest from pyramid.interfaces import IView from pyramid.interfaces import IViewClassifier from pyramid.exceptions import NotFound from pyramid.config import Configurator from pyramid.registry import undefer from pyramid_zcml._compat import b reg = self.config.registry config = Configurator(reg) def dummy_renderer_factory(*arg, **kw): return lambda *arg, **kw: 'OK' config.add_renderer('.pt', dummy_renderer_factory) config.commit() def view(request): return {} context = DummyZCMLContext(self.config) self._callFUT(context, view, renderer='fake.pt') actions = extract_actions(context.actions) regadapt = actions[0] discrim = undefer(regadapt['discriminator']) register = regadapt['callable'] register() derived_view = reg.adapters.lookup( (IViewClassifier, IRequest, implementedBy(NotFound)), IView, default=None) self.assertNotEqual(derived_view, None) self.assertEqual(derived_view(None, None).body, b('OK')) self.assertEqual(derived_view.__name__, 'view') class TestForbiddenDirective(unittest.TestCase): def setUp(self): self.config = testing.setUp(autocommit=False) def tearDown(self): testing.tearDown() def _callFUT(self, context, view, **kw): from pyramid_zcml import forbidden return forbidden(context, view, **kw) def test_it(self): from zope.interface import implementedBy from pyramid.interfaces import IRequest from pyramid.interfaces import IView from pyramid.interfaces import IViewClassifier from pyramid.exceptions import Forbidden from pyramid.registry import undefer reg = self.config.registry context = DummyZCMLContext(self.config) def view(request): return 'OK' self._callFUT(context, view, renderer=null_renderer) actions = extract_actions(context.actions) self.assertEqual(len(actions), 1) discrim = undefer(actions[0]['discriminator']) self.assertEqual(discrim[0], 'view') self.assertEqual(discrim[1], Forbidden) register = actions[0]['callable'] register() derived_view = reg.adapters.lookup( (IViewClassifier, IRequest, implementedBy(Forbidden)), IView, default=None) self.assertNotEqual(derived_view, None) self.assertEqual(derived_view(None, None), 'OK') self.assertEqual(derived_view.__name__, 'view') def test_it_with_dotted_renderer(self): from zope.interface import implementedBy from pyramid.interfaces import IRequest from pyramid.interfaces import IView from pyramid.interfaces import IViewClassifier from pyramid.exceptions import Forbidden from pyramid.config import Configurator from pyramid.registry import undefer from pyramid_zcml._compat import b reg = self.config.registry config = Configurator(reg) def dummy_renderer_factory(*arg, **kw): return lambda *arg, **kw: 'OK' config.add_renderer('.pt', dummy_renderer_factory) config.commit() def view(request): return {} context = DummyZCMLContext(self.config) self._callFUT(context, view, renderer='fake.pt') actions = extract_actions(context.actions) regadapt = actions[0] regadapt['discriminator'] = undefer(regadapt['discriminator']) # XXX register = regadapt['callable'] register() derived_view = reg.adapters.lookup( (IViewClassifier, IRequest, implementedBy(Forbidden)), IView, default=None) self.assertNotEqual(derived_view, None) self.assertEqual(derived_view(None, None).body, b('OK')) self.assertEqual(derived_view.__name__, 'view') class TestRepozeWho1AuthenticationPolicyDirective(unittest.TestCase): def setUp(self): self.config = testing.setUp(autocommit=False) def tearDown(self): testing.tearDown() def _callFUT(self, context, **kw): from pyramid_zcml import repozewho1authenticationpolicy return repozewho1authenticationpolicy(context, **kw) def test_it_defaults(self): reg = self.config.registry from pyramid.interfaces import IAuthenticationPolicy context = DummyZCMLContext(self.config) self._callFUT(context) actions = extract_actions(context.actions) from pyramid.interfaces import IAuthorizationPolicy reg.registerUtility(object(), IAuthorizationPolicy) _execute_actions(actions) policy = reg.getUtility(IAuthenticationPolicy) self.assertEqual(policy.callback, None) self.assertEqual(policy.identifier_name, 'auth_tkt') def test_it(self): reg = self.config.registry from pyramid.interfaces import IAuthenticationPolicy context = DummyZCMLContext(self.config) def callback(identity, request): """ """ self._callFUT(context, identifier_name='something', callback=callback) actions = extract_actions(context.actions) from pyramid.interfaces import IAuthorizationPolicy reg.registerUtility(object(), IAuthorizationPolicy) _execute_actions(actions) policy = reg.getUtility(IAuthenticationPolicy) self.assertEqual(policy.callback, callback) self.assertEqual(policy.identifier_name, 'something') class TestRemoteUserAuthenticationPolicyDirective(unittest.TestCase): def setUp(self): self.config = testing.setUp(autocommit=False) def tearDown(self): testing.tearDown() def _callFUT(self, context, **kw): from pyramid_zcml import remoteuserauthenticationpolicy return remoteuserauthenticationpolicy(context, **kw) def test_defaults(self): from pyramid.interfaces import IAuthenticationPolicy reg = self.config.registry context = DummyZCMLContext(self.config) def callback(identity, request): """ """ self._callFUT(context) actions = extract_actions(context.actions) from pyramid.interfaces import IAuthorizationPolicy reg.registerUtility(object(), IAuthorizationPolicy) _execute_actions(actions) policy = reg.getUtility(IAuthenticationPolicy) self.assertEqual(policy.environ_key, 'REMOTE_USER') self.assertEqual(policy.callback, None) def test_it(self): from pyramid.interfaces import IAuthenticationPolicy reg = self.config.registry context = DummyZCMLContext(self.config) def callback(identity, request): """ """ self._callFUT(context, environ_key='BLAH', callback=callback) actions = extract_actions(context.actions) from pyramid.interfaces import IAuthorizationPolicy reg.registerUtility(object(), IAuthorizationPolicy) _execute_actions(actions) policy = reg.getUtility(IAuthenticationPolicy) self.assertEqual(policy.environ_key, 'BLAH') self.assertEqual(policy.callback, callback) class TestAuthTktAuthenticationPolicyDirective(unittest.TestCase): def setUp(self): self.config = testing.setUp(autocommit=False) def tearDown(self): testing.tearDown() def _callFUT(self, context, secret, **kw): from pyramid_zcml import authtktauthenticationpolicy return authtktauthenticationpolicy(context, secret, **kw) def test_it_defaults(self): from pyramid.interfaces import IAuthenticationPolicy reg = self.config.registry context = DummyZCMLContext(self.config) self._callFUT(context, 'sosecret') actions = extract_actions(context.actions) from pyramid.interfaces import IAuthorizationPolicy reg.registerUtility(object(), IAuthorizationPolicy) _execute_actions(actions) policy = reg.getUtility(IAuthenticationPolicy) self.assertEqual(policy.cookie.secret, 'sosecret') self.assertEqual(policy.callback, None) def test_it_noconfigerror(self): from pyramid.interfaces import IAuthenticationPolicy reg = self.config.registry context = DummyZCMLContext(self.config) def callback(identity, request): """ """ self._callFUT(context, 'sosecret', callback=callback, cookie_name='auth_tkt', secure=True, include_ip=True, timeout=100, reissue_time=60, http_only=True, path="/sub/") actions = extract_actions(context.actions) from pyramid.interfaces import IAuthorizationPolicy reg.registerUtility(object(), IAuthorizationPolicy) _execute_actions(actions) policy = reg.getUtility(IAuthenticationPolicy) self.assertEqual(policy.cookie.path, '/sub/') self.assertEqual(policy.cookie.http_only, True) self.assertEqual(policy.cookie.secret, 'sosecret') self.assertEqual(policy.callback, callback) class TestACLAuthorizationPolicyDirective(unittest.TestCase): def setUp(self): self.config = testing.setUp(autocommit=False) def tearDown(self): testing.tearDown() def _callFUT(self, context, **kw): from pyramid_zcml import aclauthorizationpolicy return aclauthorizationpolicy(context, **kw) def test_it(self): from pyramid.authorization import ACLAuthorizationPolicy from pyramid.interfaces import IAuthorizationPolicy context = DummyZCMLContext(self.config) def callback(identity, request): """ """ self._callFUT(context) actions = extract_actions(self.config._ctx.actions) from pyramid.interfaces import IAuthenticationPolicy reg = self.config.registry reg.registerUtility(object(), IAuthenticationPolicy) _execute_actions(actions) policy = reg.getUtility(IAuthorizationPolicy) self.assertEqual(policy.__class__, ACLAuthorizationPolicy) class TestRouteDirective(unittest.TestCase): def setUp(self): self.config = testing.setUp(autocommit=False) def tearDown(self): testing.tearDown() def _callFUT(self, *arg, **kw): from pyramid_zcml import route return route(*arg, **kw) def _assertRoute(self, name, pattern, num_predicates=0): from pyramid.interfaces import IRoutesMapper reg = self.config.registry mapper = reg.getUtility(IRoutesMapper) routes = mapper.get_routes() route = routes[0] self.assertEqual(len(routes), 1) self.assertEqual(route.name, name) self.assertEqual(route.pattern, pattern) self.assertEqual(len(routes[0].predicates), num_predicates) return route def test_with_view(self): from zope.interface import Interface from pyramid.interfaces import IView from pyramid.interfaces import IViewClassifier from pyramid.interfaces import IRouteRequest reg = self.config.registry context = DummyZCMLContext(self.config) view = lambda *arg: 'OK' self._callFUT(context, 'name', 'pattern', view=view) actions = extract_actions(context.actions) _execute_actions(actions) request_type = reg.getUtility(IRouteRequest, 'name') wrapped = reg.adapters.lookup( (IViewClassifier, request_type, Interface), IView, name='') self.assertTrue(wrapped) def test_with_view_and_view_context(self): from pyramid.interfaces import IView from pyramid.interfaces import IViewClassifier from pyramid.interfaces import IRouteRequest reg = self.config.registry context = DummyZCMLContext(self.config) view = lambda *arg: 'OK' self._callFUT(context, 'name', 'pattern', view=view, view_context=IDummy) actions = extract_actions(context.actions) _execute_actions(actions) request_type = reg.getUtility(IRouteRequest, 'name') self._assertRoute('name', 'pattern') wrapped = reg.adapters.lookup( (IViewClassifier, request_type, IDummy), IView, name='') self.assertTrue(wrapped) def test_with_view_context_trumps_view_for(self): from pyramid.interfaces import IView from pyramid.interfaces import IViewClassifier from pyramid.interfaces import IRouteRequest reg = self.config.registry context = DummyZCMLContext(self.config) view = lambda *arg: 'OK' class Foo: pass self._callFUT(context, 'name', 'pattern', view=view, view_context=IDummy, view_for=Foo) actions = extract_actions(context.actions) _execute_actions(actions) request_type = reg.getUtility(IRouteRequest, 'name') self._assertRoute('name', 'pattern') wrapped = reg.adapters.lookup( (IViewClassifier, request_type, IDummy), IView, name='') self.assertTrue(wrapped) def test_with_dotted_renderer(self): from zope.interface import Interface from pyramid.interfaces import IView from pyramid.interfaces import IViewClassifier from pyramid.interfaces import IRouteRequest from pyramid.interfaces import IRendererFactory reg = self.config.registry def renderer(path): return lambda *arg: 'OK' reg.registerUtility(renderer, IRendererFactory, name='.pt') context = DummyZCMLContext(self.config) view = lambda *arg: 'OK' self._callFUT(context, 'name', 'pattern', view=view, renderer='fixtureapp/templates/foo.pt') actions = extract_actions(context.actions) _execute_actions(actions) request_type = reg.getUtility(IRouteRequest, 'name') wrapped = reg.adapters.lookup( (IViewClassifier, request_type, Interface), IView, name='') self.assertTrue(wrapped) request = DummyRequest() result = wrapped(None, request) self.assertEqual(result.body, b'OK') def test_with_custom_predicates(self): def pred1(context, request): pass def pred2(context, request): pass context = DummyZCMLContext(self.config) self._callFUT(context, 'name', 'pattern', custom_predicates=(pred1, pred2)) actions = extract_actions(context.actions) _execute_actions(actions) self._assertRoute('name', 'pattern', 2) def test_with_path_argument_no_pattern(self): context = DummyZCMLContext(self.config) self._callFUT(context, 'name', path='pattern') actions = extract_actions(context.actions) _execute_actions(actions) self._assertRoute('name', 'pattern') def test_with_path_argument_and_pattern(self): context = DummyZCMLContext(self.config) self._callFUT(context, 'name', pattern='pattern', path='path') actions = extract_actions(context.actions) _execute_actions(actions) self._assertRoute('name', 'pattern') def test_with_neither_path_nor_pattern(self): from pyramid.exceptions import ConfigurationError context = DummyZCMLContext(self.config) self.assertRaises(ConfigurationError, self._callFUT, context, 'name') class TestStaticDirective(unittest.TestCase): def setUp(self): self.config = testing.setUp(autocommit=False) package = sys.modules[__name__] self.config.package = package self.config.package_name = package.__name__ def tearDown(self): testing.tearDown() def _callFUT(self, *arg, **kw): from pyramid_zcml import static return static(*arg, **kw) def test_it_with_slash(self): self.config.testing_securitypolicy(permissive=False) from zope.interface import implementedBy try: from pyramid.config.views import StaticURLInfo except ImportError: # pragma: no cover from pyramid.static import StaticURLInfo from pyramid.interfaces import IView from pyramid.interfaces import IViewClassifier from pyramid.interfaces import IRouteRequest from pyramid.interfaces import IRoutesMapper reg = self.config.registry context = DummyZCMLContext(self.config) self._callFUT(context, 'name', '', renderer=null_renderer) actions = extract_actions(context.actions) _execute_actions(actions) mapper = reg.getUtility(IRoutesMapper) routes = mapper.get_routes() self.assertEqual(len(routes), 1) self.assertEqual(routes[0].pattern, 'name/*subpath') self.assertTrue('name' in routes[0].name) iface = implementedBy(StaticURLInfo) request_type = reg.getUtility(IRouteRequest, routes[0].name) view = reg.adapters.lookup( (IViewClassifier, request_type, iface), IView, name='') request = DummyRequest() try: val = view(None, request).__class__.__name__ except Exception as e: val = e.__class__.__name__ self.assertTrue(val in ['PackageURLParser', 'HTTPMovedPermanently']) def test_it_with_nondefault_permission(self): from pyramid.exceptions import Forbidden self.config.testing_securitypolicy(permissive=False) from zope.interface import implementedBy try: from pyramid.config.views import StaticURLInfo except ImportError: # pragma: no cover from pyramid.static import StaticURLInfo from pyramid.interfaces import IView from pyramid.interfaces import IViewClassifier from pyramid.interfaces import IRouteRequest from pyramid.interfaces import IRoutesMapper reg = self.config.registry context = DummyZCMLContext(self.config) self._callFUT(context, 'name', 'fixtures/static', permission='aperm') actions = extract_actions(context.actions) _execute_actions(actions) mapper = reg.getUtility(IRoutesMapper) routes = mapper.get_routes() self.assertEqual(len(routes), 1) self.assertEqual(routes[0].pattern, 'name/*subpath') self.assertTrue('name' in routes[0].name) iface = implementedBy(StaticURLInfo) request_type = reg.getUtility(IRouteRequest, routes[0].name) view = reg.adapters.lookup( (IViewClassifier, request_type, iface), IView, name='') request = DummyRequest() self.assertRaises(Forbidden, view, None, request) class TestAssetDirective(unittest.TestCase): def setUp(self): self.config = testing.setUp(autocommit=False) def tearDown(self): testing.tearDown() def _callFUT(self, *arg, **kw): from pyramid_zcml import asset return asset(*arg, **kw) def test_it(self): from pyramid.registry import undefer import pyramid_zcml.tests context = DummyZCMLContext(self.config) L = [] def dummy_override(*arg): L.append(arg) self._callFUT(context, 'pyramid_zcml.tests:fixtures/', 'pyramid_zcml.tests:fixtureapp/', _override=dummy_override) actions = extract_actions(context.actions) self.assertEqual(len(actions), 1) action = actions[0] discrim = undefer(actions[0]['discriminator']) self.assertEqual(action['discriminator'], None) action['callable']() self.assertEqual( L, [(pyramid_zcml.tests, 'fixtures/', pyramid_zcml.tests, 'fixtureapp/')]) class TestRendererDirective(unittest.TestCase): def setUp(self): self.config = testing.setUp(autocommit=False) def tearDown(self): testing.tearDown() def _callFUT(self, *arg, **kw): from pyramid_zcml import renderer return renderer(*arg, **kw) def test_it(self): from pyramid.interfaces import IRendererFactory reg = self.config.registry context = DummyZCMLContext(self.config) renderer = lambda *arg, **kw: None self._callFUT(context, renderer, 'r') actions = extract_actions(context.actions) _execute_actions(actions) self.assertTrue(reg.getUtility(IRendererFactory, 'r'), renderer) class TestZCMLConfigure(unittest.TestCase): i = 0 def _callFUT(self, path, package): from pyramid_zcml import zcml_configure return zcml_configure(path, package) def setUp(self): from zope.deprecation import __show__ __show__.off() testing.setUp(autocommit=False) self.tempdir = None import sys import os import tempfile from pyramid.path import package_path from pyramid_zcml.tests import fixtureapp as package import shutil tempdir = tempfile.mkdtemp() modname = 'myfixture%s' % self.i self.i += 1 self.packagepath = os.path.join(tempdir, modname) fixturedir = package_path(package) shutil.copytree(fixturedir, self.packagepath) sys.path.insert(0, tempdir) self.module = __import__(modname) self.tempdir = tempdir def tearDown(self): from zope.deprecation import __show__ __show__.on() testing.tearDown() import sys import shutil if self.module is not None: del sys.modules[self.module.__name__] if self.tempdir is not None: sys.path.pop(0) shutil.rmtree(self.tempdir) def test_zcml_configure(self): actions = self._callFUT('configure.zcml', self.module) self.assertTrue(actions) self.assertTrue(isinstance(actions, list)) def test_zcml_configure_nonexistent_configure_dot_zcml(self): import os os.remove(os.path.join(self.packagepath, 'configure.zcml')) self.assertRaises(IOError, self._callFUT, 'configure.zcml', self.module) class TestZCMLScanDirective(unittest.TestCase): def setUp(self): self.config = testing.setUp(autocommit=False) def tearDown(self): testing.tearDown() def _callFUT(self, context, package): from pyramid_zcml import scan return scan(context, package) def test_it(self): class DummyVenusianCategories(dict): def attached_to(self, ob): return True dummy_module = DummyModule() def foo(): pass def bar(scanner, name, ob): dummy_module.scanned = True foo.__venusian_callbacks__ = DummyVenusianCategories( {'pyramid':[(bar, 'dummy')]}) dummy_module.foo = foo context = DummyZCMLContext(self.config) self._callFUT(context, dummy_module) self.assertTrue(dummy_module.scanned) class TestAdapterDirective(unittest.TestCase): def setUp(self): self.config = testing.setUp(autocommit=False) def tearDown(self): testing.tearDown() def _callFUT(self, *arg, **kw): from pyramid_zcml import adapter return adapter(*arg, **kw) def test_for_is_None_no_adaptedBy(self): context = DummyContext() factory = DummyFactory() self.assertRaises(TypeError, self._callFUT, context, [factory], provides=None, for_=None) def test_for_is_None_adaptedBy_still_None(self): context = DummyContext() factory = DummyFactory() factory.__component_adapts__ = None self.assertRaises(TypeError, self._callFUT, context, [factory], provides=None, for_=None) def test_for_is_None_adaptedBy_set(self): from pyramid.registry import Registry from pyramid.registry import undefer from pyramid_zcml._compat import unwrap_func context = DummyContext() context.registry = self.config.registry factory = DummyFactory() factory.__component_adapts__ = (IDummy,) self._callFUT(context, [factory], provides=IFactory, for_=None) actions = extract_actions(context.actions) self.assertEqual(len(actions), 1) regadapt = actions[0] discrim = undefer(regadapt['discriminator']) self.assertEqual(discrim, ('adapter', (IDummy,), IFactory, '')) self.assertTrue(unwrap_func(regadapt['callable']) is unwrap_func(Registry.registerAdapter)) self.assertEqual(regadapt['args'], (factory, (IDummy,), IFactory, '', None)) def test_provides_missing(self): context = DummyContext() factory = DummyFactory() self.assertRaises(TypeError, self._callFUT, context, [factory], provides=None, for_=(IDummy,)) def test_provides_obtained_via_implementedBy(self): from pyramid.registry import Registry from pyramid.registry import undefer from pyramid_zcml._compat import unwrap_func context = DummyContext() context.registry = self.config.registry self._callFUT(context, [DummyFactory], for_=(IDummy,)) regadapt = extract_actions(context.actions)[0] discrim = undefer(regadapt['discriminator']) # XXX self.assertEqual(discrim, ('adapter', (IDummy,), IFactory, '')) self.assertTrue(unwrap_func(regadapt['callable']) is unwrap_func(Registry.registerAdapter)) self.assertEqual(regadapt['args'], (DummyFactory, (IDummy,), IFactory, '', None)) def test_multiple_factories_multiple_for(self): context = DummyContext() factory = DummyFactory() self.assertRaises(ValueError, self._callFUT, context, [factory, factory], provides=IFactory, for_=(IDummy, IDummy)) def test_no_factories_multiple_for(self): context = DummyContext() self.assertRaises(ValueError, self._callFUT, context, factory=[], provides=IFactory, for_=(IDummy, IDummy)) def test_rolled_up_factories(self): from pyramid.registry import Registry from pyramid.registry import undefer from pyramid_zcml._compat import unwrap_func context = DummyContext() context.registry = self.config.registry factory = DummyFactory() self._callFUT(context, [factory, factory], provides=IFactory, for_=(IDummy,)) regadapt = extract_actions(context.actions)[0] discrim = undefer(regadapt['discriminator']) # XXX self.assertEqual(discrim, ('adapter', (IDummy,), IFactory, '')) self.assertTrue(unwrap_func(regadapt['callable']) is unwrap_func(Registry.registerAdapter)) self.assertEqual(regadapt['args'][0].__module__, 'pyramid_zcml') class TestSubscriberDirective(unittest.TestCase): def setUp(self): self.config = testing.setUp(autocommit=False) def tearDown(self): testing.tearDown() def _callFUT(self, *arg, **kw): from pyramid_zcml import subscriber return subscriber(*arg, **kw) def test_no_factory_no_handler(self): context = DummyZCMLContext(self.config) self.assertRaises(TypeError, self._callFUT, context, for_=None, factory=None, handler=None, provides=None) def test_handler_with_provides(self): context = DummyZCMLContext(self.config) self.assertRaises(TypeError, self._callFUT, context, for_=None, factory=None, handler=1, provides=1) def test_handler_and_factory(self): context = DummyZCMLContext(self.config) self.assertRaises(TypeError, self._callFUT, context, for_=None, factory=1, handler=1, provides=None) def test_no_provides_with_factory(self): context = DummyZCMLContext(self.config) self.assertRaises(TypeError, self._callFUT, context, for_=None, factory=1, handler=None, provides=None) def test_adapted_by_as_for_is_None(self): context = DummyZCMLContext(self.config) factory = DummyFactory() factory.__component_adapts__ = None self.assertRaises(TypeError, self._callFUT, context, for_=None, factory=factory, handler=None, provides=IFactory) def test_register_with_factory(self): context = DummyZCMLContext(self.config) factory = DummyFactory() self._callFUT(context, for_=(IDummy,), factory=factory, handler=None, provides=IFactory) actions = extract_actions(context.actions) self.assertEqual(len(actions), 1) subadapt = actions[0] self.assertEqual(subadapt['discriminator'], None) subadapt['callable'](*subadapt['args'], **subadapt['kw']) registrations = self.config.registry._subscription_registrations self.assertEqual(len(registrations), 1) reg = registrations[0] self.assertEqual( reg[:4], ((IDummy,), IFactory, None, factory) ) def test_register_with_handler(self): from pyramid_zcml._compat import u context = DummyZCMLContext(self.config) factory = DummyFactory() self._callFUT(context, for_=(IDummy,), factory=None, handler=factory) actions = extract_actions(context.actions) self.assertEqual(len(actions), 1) subadapt = actions[0] self.assertEqual(subadapt['discriminator'], None) subadapt['callable'](*subadapt['args'], **subadapt['kw']) registrations = self.config.registry._handler_registrations self.assertEqual(len(registrations), 1) self.assertEqual( registrations[0][:3], ((IDummy,), u(''), factory) ) class TestUtilityDirective(unittest.TestCase): def setUp(self): self.config = testing.setUp(autocommit=False) def tearDown(self): testing.tearDown() def _callFUT(self, *arg, **kw): from pyramid_zcml import utility return utility(*arg, **kw) def test_factory_and_component(self): context = DummyZCMLContext(self.config) self.assertRaises(TypeError, self._callFUT, context, factory=1, component=1) def test_missing_provides(self): context = DummyZCMLContext(self.config) self.assertRaises(TypeError, self._callFUT, context, provides=None) def test_provides_from_factory_implements(self): from pyramid.registry import Registry from pyramid.registry import undefer from pyramid_zcml._compat import unwrap_func context = DummyZCMLContext(self.config) self._callFUT(context, factory=DummyFactory) actions = extract_actions(context.actions) self.assertEqual(len(actions), 1) utility = actions[0] discrim = undefer(utility['discriminator']) self.assertEqual(discrim, ('utility', IFactory, '')) self.assertTrue(unwrap_func(utility['callable']) is unwrap_func(Registry.registerUtility)) self.assertEqual(utility['args'][:3], (None, IFactory, '')) self.assertEqual(utility['kw'], {'factory':DummyFactory}) def test_provides_from_component_provides(self): from pyramid.registry import Registry from pyramid.registry import undefer from pyramid_zcml._compat import unwrap_func context = DummyZCMLContext(self.config) component = DummyFactory() self._callFUT(context, component=component) actions = extract_actions(context.actions) self.assertEqual(len(actions), 1) utility = actions[0] discrim = undefer(utility['discriminator']) self.assertEqual(discrim, ('utility', IFactory, '')) self.assertTrue(unwrap_func(utility['callable']) is unwrap_func(Registry.registerUtility)) self.assertEqual(utility['args'][:3], (component, IFactory, '')) self.assertEqual(utility['kw'], {}) class TestTranslationDirDirective(unittest.TestCase): def setUp(self): self.config = testing.setUp(autocommit=False) def tearDown(self): testing.tearDown() def _callFUT(self, *arg, **kw): from pyramid_zcml import translationdir return translationdir(*arg, **kw) def test_it(self): import os here = os.path.dirname(__file__) expected = os.path.join(here, 'localeapp', 'locale') from pyramid.interfaces import ITranslationDirectories context = DummyZCMLContext(self.config) tdir = 'pyramid_zcml.tests.localeapp:locale' self._callFUT(context, tdir) actions = extract_actions(context.actions) _execute_actions(actions) util = self.config.registry.getUtility(ITranslationDirectories) self.assertEqual(util, [expected]) class TestLocaleNegotiatorDirective(unittest.TestCase): def setUp(self): self.config = testing.setUp(autocommit=False) def tearDown(self): testing.tearDown() def _callFUT(self, *arg, **kw): from pyramid_zcml import localenegotiator return localenegotiator(*arg, **kw) def test_it(self): from pyramid.interfaces import ILocaleNegotiator from pyramid.registry import undefer context = DummyZCMLContext(self.config) dummy_negotiator = object() self._callFUT(context, dummy_negotiator) actions = extract_actions(context.actions) self.assertEqual(len(actions), 1) action = actions[0] self.assertEqual(undefer(action['discriminator']), ILocaleNegotiator) callback = action['callable'] callback() self.assertEqual(self.config.registry.getUtility(ILocaleNegotiator), dummy_negotiator) class TestDefaultPermissionDirective(unittest.TestCase): def setUp(self): self.config = testing.setUp(autocommit=False) def tearDown(self): testing.tearDown() def _callFUT(self, context, name): from pyramid_zcml import default_permission return default_permission(context, name) def test_it(self): from pyramid.interfaces import IDefaultPermission reg = self.config.registry context = DummyZCMLContext(self.config) self._callFUT(context, 'view') actions = extract_actions(context.actions) _execute_actions(actions) perm = reg.getUtility(IDefaultPermission) self.assertEqual(perm, 'view') class TestLoadZCML(unittest.TestCase): def setUp(self): testing.setUp(autocommit=False) def tearDown(self): testing.tearDown() def test_it(self): from zope.configuration import xmlconfig import pyramid_zcml xmlconfig.file('configure.zcml', package=pyramid_zcml) class TestRolledUpFactory(unittest.TestCase): def _callFUT(self, *factories): from pyramid_zcml import _rolledUpFactory return _rolledUpFactory(factories) def test_it(self): def foo(ob): return ob factory = self._callFUT(foo, foo) result = factory(True) self.assertEqual(result, True) class Test_path_spec(unittest.TestCase): def _callFUT(self, context, path): from pyramid_zcml import path_spec return path_spec(context, path) def test_no_package_attr(self): context = DummyContext() path = '/thepath' result = self._callFUT(context, path) self.assertEqual(result, path) def test_package_attr_None(self): context = DummyContext() context.package = None path = '/thepath' result = self._callFUT(context, path) self.assertEqual(result, path) def test_package_path_doesnt_start_with_abspath(self): context = DummyContext() context.package = DummyPackage('pyramid_zcml') path = '/thepath' result = self._callFUT(context, path) self.assertEqual(result, path) def test_package_path_starts_with_abspath(self): import pkg_resources import os context = DummyContext() package = DummyPackage('pyramid_zcml') package_path = pkg_resources.resource_filename('pyramid_zcml', '') template_path = os.path.join(package_path, 'templates/foo.pt') context.package = package result = self._callFUT(context, template_path) self.assertEqual(result, 'pyramid_zcml:templates/foo.pt') def test_package_name_is___main__(self): context = DummyContext() package = DummyPackage('__main__') context.package = package result = self._callFUT(context, '/foo.pt') self.assertEqual(result, '/foo.pt') def test_path_is_already_asset_spec(self): context = DummyContext() result = self._callFUT(context, 'pyramid_zcml:foo.pt') self.assertEqual(result, 'pyramid_zcml:foo.pt') class Test_load_zcml(unittest.TestCase): def _makeOne(self, autocommit=False, package=None): from pyramid_zcml import load_zcml from pyramid.config import Configurator c = Configurator(autocommit=autocommit, package=package) c.add_directive('load_zcml', load_zcml, action_wrap=False) return c def test_load_zcml_default(self): import pyramid_zcml.tests.fixtureapp config = self._makeOne(package=pyramid_zcml.tests.fixtureapp, autocommit=True) registry = config.load_zcml() from pyramid_zcml.tests.fixtureapp.models import IFixture self.assertTrue(registry.queryUtility(IFixture)) # only in c.zcml def test_load_zcml_without_autocommit(self): from pyramid_zcml.tests.fixtureapp.models import IFixture import pyramid_zcml.tests.fixtureapp config = self._makeOne(package=pyramid_zcml.tests.fixtureapp, autocommit=False) registry = config.load_zcml() self.assertFalse(registry.queryUtility(IFixture)) # only in c.zcml config.commit() self.assertTrue(registry.queryUtility(IFixture)) # only in c.zcml def test_load_zcml_routesapp(self): from pyramid.interfaces import IRoutesMapper config = self._makeOne(autocommit=True) config.load_zcml('pyramid_zcml.tests.routesapp:configure.zcml') self.assertTrue(config.registry.getUtility(IRoutesMapper)) def test_load_zcml_fixtureapp(self): from pyramid_zcml.tests.fixtureapp.models import IFixture config = self._makeOne(autocommit=True) config.load_zcml('pyramid_zcml.tests.fixtureapp:configure.zcml') self.assertTrue(config.registry.queryUtility(IFixture)) # only in c.zcml def test_load_zcml_as_relative_filename(self): import pyramid_zcml.tests.fixtureapp config = self._makeOne(package=pyramid_zcml.tests.fixtureapp, autocommit=True) registry = config.load_zcml('configure.zcml') from pyramid_zcml.tests.fixtureapp.models import IFixture self.assertTrue(registry.queryUtility(IFixture)) # only in c.zcml def test_load_zcml_as_absolute_filename(self): import os import pyramid_zcml.tests.fixtureapp config = self._makeOne(package=pyramid_zcml.tests.fixtureapp, autocommit=True) dn = os.path.dirname(pyramid_zcml.tests.fixtureapp.__file__) c_z = os.path.join(dn, 'configure.zcml') registry = config.load_zcml(c_z) from pyramid_zcml.tests.fixtureapp.models import IFixture self.assertTrue(registry.queryUtility(IFixture)) # only in c.zcml def test_load_zcml_lock_and_unlock(self): config = self._makeOne(autocommit=True) dummylock = DummyLock() config.load_zcml( 'pyramid_zcml.tests.fixtureapp:configure.zcml', lock=dummylock) self.assertEqual(dummylock.acquired, True) self.assertEqual(dummylock.released, True) class Test_includeme(unittest.TestCase): def test_it(self): from pyramid.config import Configurator from pyramid_zcml import load_zcml from pyramid_zcml import includeme from pyramid_zcml._compat import unwrap_func c = Configurator(autocommit=True) c.include(includeme) self.assertTrue(unwrap_func(c.load_zcml) is load_zcml) class IDummy(Interface): pass class IFactory(Interface): pass @implementer(IFactory) class DummyFactory(object): def __call__(self): """ """ class DummyModule: __path__ = "foo" __name__ = "dummy" __file__ = '' scanned = False class DummyContext: def __init__(self, resolved=DummyModule): self.actions = [] self.info = None self.resolved = resolved self.package = None def action(self, discriminator, callable=None, args=(), kw={}, order=0): self.actions.append((discriminator, callable, args, kw, order)) def path(self, path): return path class TestMakeApp(unittest.TestCase): def setUp(self): from zope.deprecation import __show__ __show__.off() testing.setUp() def tearDown(self): from zope.deprecation import __show__ __show__.on() testing.tearDown() def _callFUT(self, *arg, **kw): from pyramid_zcml import make_app return make_app(*arg, **kw) def test_it(self): from pyramid_zcml import includeme settings = {'a':1} rootfactory = object() app = self._callFUT(rootfactory, settings=settings, Configurator=DummyConfigurator) self.assertEqual(app.root_factory, rootfactory) self.assertEqual(app.settings, settings) self.assertEqual(app.zcml_file, 'configure.zcml') self.assertEqual(app.zca_hooked, True) self.assertEqual(app.included, [includeme]) def test_it_options_means_settings(self): settings = {'a':1} rootfactory = object() app = self._callFUT(rootfactory, options=settings, Configurator=DummyConfigurator) self.assertEqual(app.root_factory, rootfactory) self.assertEqual(app.settings, settings) self.assertEqual(app.zcml_file, 'configure.zcml') def test_it_with_package(self): package = object() rootfactory = object() app = self._callFUT(rootfactory, package=package, Configurator=DummyConfigurator) self.assertEqual(app.package, package) def test_it_with_custom_configure_zcml(self): rootfactory = object() settings = {'configure_zcml':'2.zcml'} app = self._callFUT(rootfactory, filename='1.zcml', settings=settings, Configurator=DummyConfigurator) self.assertEqual(app.zcml_file, '2.zcml') class Test_with_context(unittest.TestCase): def test_with_context(self): from pyramid_zcml import with_context class Dummy(object): def __init__(self, **kw): self.__dict__.update(kw) context = Dummy() context.basepath = 'basepath' context.includepath = ('spec',) context.package = 'pyramid' context.autocommit = True context.registry = 'abc' context.route_prefix = 'buz' context.introspection = True context.info = 'info' context.config_class = Dummy newconfig = with_context(context) self.assertEqual(newconfig.package, 'pyramid') self.assertEqual(newconfig.autocommit, True) self.assertEqual(newconfig.registry, 'abc') self.assertEqual(newconfig.route_prefix, 'buz') self.assertEqual(newconfig.basepath, 'basepath') self.assertEqual(newconfig.includepath, ('spec',)) self.assertEqual(newconfig.info, 'info') self.assertEqual(newconfig.introspection, True) class Dummy: pass class DummyRoute: pass class DummyRequest: subpath = () path_url = '' query_string = '' def __init__(self, environ=None): if environ is None: environ = {} self.environ = environ self.path_info = environ.get('PATH_INFO', None) def get_response(self, app): # pragma: no cover return app def copy(self): # pragma: no cover return self class DummyPackage(object): def __init__(self, name): self.__name__ = name self.__file__ = '/__init__.py' def extract_actions(native): try: from pyramid.config import expand_action except ImportError: # pragma: no cover from zope.configuration.config import expand_action L = [] for action in native: if isinstance(action, dict): d = action else: # pragma: no cover d = expand_action(*action) if not isinstance(d, dict): (discriminator, callable, args, kw, includepath, info, order ) = d[:7] d = {} d['discriminator'] = discriminator d['callable'] = callable d['args'] = args d['kw'] = kw d['order'] = order L.append(d) return L class DummyLock: def acquire(self): self.acquired = True def release(self): self.released = True class DummyConfigurator(object): def __init__(self, registry=None, package=None, root_factory=None, settings=None, autocommit=True): self.root_factory = root_factory self.package = package self.settings = settings self.autocommit = autocommit self.included = [] def begin(self, request=None): self.begun = True self.request = request def end(self): self.ended = True def include(self, func): self.included.append(func) def load_zcml(self, filename): self.zcml_file = filename def make_wsgi_app(self): return self def hook_zca(self): self.zca_hooked = True class DummyZCMLContext(object): def __init__(self, config): if hasattr(config, '_make_context'): # pragma: no cover # 1.0, 1.1 b/c config._ctx = config._make_context() self.registry = config.registry self.package = config.package self.autocommit = config.autocommit self.route_prefix = getattr(config, 'route_prefix', None) self.basepath = getattr(config, 'basepath', None) self.includepath = getattr(config, 'includepath', ()) self.info = getattr(config, 'info', '') self.actions = config._ctx.actions self.introspection = True self._ctx = config._ctx self.config_class = config.__class__ def action(self, *arg, **kw): self._ctx.action(*arg, **kw) def _execute_actions(actions): from pyramid.registry import undefer for action in sorted(actions, key=lambda x: x['order']): if 'discriminator' in action: discrim = undefer(action['discriminator']) if 'callable' in action: if action['callable']: action['callable']() pyramid_zcml-1.0.0/pyramid_zcml/tests/__init__.py0000644000175000017500000000001111656047135022053 0ustar tseavertseaver#package pyramid_zcml-1.0.0/pyramid_zcml/tests/restbugapp/0000775000175000017500000000000012113677651022131 5ustar tseavertseaverpyramid_zcml-1.0.0/pyramid_zcml/tests/restbugapp/__init__.py0000644000175000017500000000001211656047135024230 0ustar tseavertseaver# package pyramid_zcml-1.0.0/pyramid_zcml/tests/restbugapp/views.py0000644000175000017500000000064611656047135023643 0ustar tseavertseaverfrom webob import Response class BaseRESTView(object): def __init__(self, context, request): self.context = context self.request = request class PetRESTView(BaseRESTView): """ REST Controller to control action of an avatar """ def __init__(self, context, request): super(PetRESTView, self).__init__(context, request) def GET(self): return Response('gotten') pyramid_zcml-1.0.0/pyramid_zcml/tests/restbugapp/configure.zcml0000644000175000017500000000074011656047135024777 0ustar tseavertseaver pyramid_zcml-1.0.0/pyramid_zcml/tests/ccbugapp/0000775000175000017500000000000012113677651021541 5ustar tseavertseaverpyramid_zcml-1.0.0/pyramid_zcml/tests/ccbugapp/__init__.py0000644000175000017500000000002611656047135023645 0ustar tseavertseaver# fixture application pyramid_zcml-1.0.0/pyramid_zcml/tests/ccbugapp/views.py0000644000175000017500000000023411656047135023244 0ustar tseavertseaverfrom webob import Response def rdf_view(request): """ """ return Response('rdf') def juri_view(request): """ """ return Response('juri') pyramid_zcml-1.0.0/pyramid_zcml/tests/ccbugapp/configure.zcml0000644000175000017500000000052211656047135024405 0ustar tseavertseaver pyramid_zcml-1.0.0/pyramid_zcml/tests/hybridapp/0000775000175000017500000000000012113677651021737 5ustar tseavertseaverpyramid_zcml-1.0.0/pyramid_zcml/tests/hybridapp/__init__.py0000644000175000017500000000001211656047135024036 0ustar tseavertseaver# package pyramid_zcml-1.0.0/pyramid_zcml/tests/hybridapp/views.py0000644000175000017500000000126011656047135023442 0ustar tseavertseaverfrom webob import Response def route_view(request): """ """ return Response('route') def global_view(request): """ """ return Response('global') def global2_view(request): """ """ return Response('global2') def route2_view(request): """ """ return Response('route2') def exception_view(request): """ """ return Response('supressed') def exception2_view(request): """ """ return Response('supressed2') def erroneous_view(request): """ """ raise RuntimeError() def erroneous_sub_view(request): """ """ raise SubException() class SuperException(Exception): """ """ class SubException(SuperException): """ """ pyramid_zcml-1.0.0/pyramid_zcml/tests/hybridapp/configure.zcml0000644000175000017500000000444311656047135024611 0ustar tseavertseaver pyramid_zcml-1.0.0/pyramid_zcml/tests/routesapp/0000775000175000017500000000000012113677651021777 5ustar tseavertseaverpyramid_zcml-1.0.0/pyramid_zcml/tests/routesapp/models.py0000644000175000017500000000011311656047135023624 0ustar tseavertseaverfrom zope.interface import Interface class IFixture(Interface): pass pyramid_zcml-1.0.0/pyramid_zcml/tests/routesapp/__init__.py0000644000175000017500000000002611656047135024103 0ustar tseavertseaver# fixture application pyramid_zcml-1.0.0/pyramid_zcml/tests/routesapp/templates/0000775000175000017500000000000012113677651023775 5ustar tseavertseaverpyramid_zcml-1.0.0/pyramid_zcml/tests/routesapp/templates/fixture.pt0000644000175000017500000000020511656047135026022 0ustar tseavertseaver pyramid_zcml-1.0.0/pyramid_zcml/tests/routesapp/views.py0000644000175000017500000000017211656047135023503 0ustar tseavertseaverfrom zope.interface import Interface def fixture_view(context, request): """ """ class IDummy(Interface): pass pyramid_zcml-1.0.0/pyramid_zcml/tests/routesapp/configure.zcml0000644000175000017500000000032211656047135024641 0ustar tseavertseaver pyramid_zcml-1.0.0/pyramid_zcml/tests/index.html0000644000175000017500000000002711656047135021746 0ustar tseavertseaver fixture pyramid_zcml-1.0.0/pyramid_zcml/tests/fixtureapp/0000775000175000017500000000000012113677651022144 5ustar tseavertseaverpyramid_zcml-1.0.0/pyramid_zcml/tests/fixtureapp/another.zcml0000644000175000017500000000026111656047135024467 0ustar tseavertseaver pyramid_zcml-1.0.0/pyramid_zcml/tests/fixtureapp/models.py0000644000175000017500000000014711656047135024000 0ustar tseavertseaverfrom zope.interface import Interface class IFixture(Interface): pass def fixture(): """ """ pyramid_zcml-1.0.0/pyramid_zcml/tests/fixtureapp/subpackage/0000775000175000017500000000000012113677651024251 5ustar tseavertseaverpyramid_zcml-1.0.0/pyramid_zcml/tests/fixtureapp/subpackage/yetanother.zcml0000644000175000017500000000025711656047135027323 0ustar tseavertseaver pyramid_zcml-1.0.0/pyramid_zcml/tests/fixtureapp/subpackage/__init__.py0000644000175000017500000000001111656047135026347 0ustar tseavertseaver#package pyramid_zcml-1.0.0/pyramid_zcml/tests/fixtureapp/subpackage/templates/0000775000175000017500000000000012113677651026247 5ustar tseavertseaverpyramid_zcml-1.0.0/pyramid_zcml/tests/fixtureapp/subpackage/templates/bar.pt0000644000175000017500000000001711656047135027353 0ustar tseavertseaver pyramid_zcml-1.0.0/pyramid_zcml/tests/fixtureapp/__init__.py0000644000175000017500000000002611656047135024250 0ustar tseavertseaver# fixture application pyramid_zcml-1.0.0/pyramid_zcml/tests/fixtureapp/templates/0000775000175000017500000000000012113677651024142 5ustar tseavertseaverpyramid_zcml-1.0.0/pyramid_zcml/tests/fixtureapp/templates/fixture.pt0000644000175000017500000000020511656047135026167 0ustar tseavertseaver pyramid_zcml-1.0.0/pyramid_zcml/tests/fixtureapp/views.py0000644000175000017500000000060511656047135023651 0ustar tseavertseaverfrom zope.interface import Interface from webob import Response from pyramid.exceptions import Forbidden def fixture_view(context, request): return Response('fixture') def erroneous_view(context, request): raise RuntimeError() def exception_view(context, request): return Response('supressed') def protected_view(context, request): raise Forbidden() class IDummy(Interface): pass pyramid_zcml-1.0.0/pyramid_zcml/tests/fixtureapp/configure.zcml0000644000175000017500000000115711656047135025015 0ustar tseavertseaver pyramid_zcml-1.0.0/pyramid_zcml/tests/localeapp/0000775000175000017500000000000012113677651021715 5ustar tseavertseaverpyramid_zcml-1.0.0/pyramid_zcml/tests/localeapp/locale/0000775000175000017500000000000012113677651023154 5ustar tseavertseaverpyramid_zcml-1.0.0/pyramid_zcml/tests/localeapp/locale/be/0000775000175000017500000000000012113677651023542 5ustar tseavertseaverpyramid_zcml-1.0.0/pyramid_zcml/tests/localeapp/locale/be/LC_MESSAGES0000644000175000017500000000001011656047135025236 0ustar tseavertseaverbusted. pyramid_zcml-1.0.0/pyramid_zcml/tests/localeapp/locale/de/0000775000175000017500000000000012113677651023544 5ustar tseavertseaverpyramid_zcml-1.0.0/pyramid_zcml/tests/localeapp/locale/de/LC_MESSAGES/0000775000175000017500000000000012113677651025331 5ustar tseavertseaverpyramid_zcml-1.0.0/pyramid_zcml/tests/localeapp/locale/de/LC_MESSAGES/deformsite.po0000644000175000017500000000151611656047135030032 0ustar tseavertseaver# German translations for deformsite. # Copyright (C) 2010 ORGANIZATION # This file is distributed under the same license as the deformsite project. # FIRST AUTHOR , 2010. # msgid "" msgstr "" "Project-Id-Version: deformsite 0.0\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2010-04-22 14:17+0400\n" "PO-Revision-Date: 2010-04-22 14:17-0400\n" "Last-Translator: FULL NAME \n" "Language-Team: de \n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 0.9.5\n" #: deformsite/__init__.py:458 msgid "Approve" msgstr "Genehmigen" #: deformsite/__init__.py:459 msgid "Show approval" msgstr "Zeigen Genehmigung" #: deformsite/__init__.py:466 msgid "Submit" msgstr "Beugen" pyramid_zcml-1.0.0/pyramid_zcml/tests/localeapp/locale/de/LC_MESSAGES/deformsite.mo0000644000175000017500000000103711656047135030025 0ustar tseavertseaverÞ•<\] esz úApproveShow approvalSubmitProject-Id-Version: deformsite 0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2010-04-22 14:17+0400 PO-Revision-Date: 2010-04-22 14:19-0400 Last-Translator: FULL NAME Language-Team: de Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 0.9.5 GenehmigenZeigen GenehmigungBeugenpyramid_zcml-1.0.0/pyramid_zcml/tests/localeapp/locale/GARBAGE0000644000175000017500000000001611656047135024121 0ustar tseavertseaverGarbage file. pyramid_zcml-1.0.0/pyramid_zcml/tests/localeapp/locale/en/0000775000175000017500000000000012113677651023556 5ustar tseavertseaverpyramid_zcml-1.0.0/pyramid_zcml/tests/localeapp/locale/en/LC_MESSAGES/0000775000175000017500000000000012113677651025343 5ustar tseavertseaverpyramid_zcml-1.0.0/pyramid_zcml/tests/localeapp/locale/en/LC_MESSAGES/deformsite.po0000644000175000017500000000151611656047135030044 0ustar tseavertseaver# German translations for deformsite. # Copyright (C) 2010 ORGANIZATION # This file is distributed under the same license as the deformsite project. # FIRST AUTHOR , 2010. # msgid "" msgstr "" "Project-Id-Version: deformsite 0.0\n" "Report-Msgid-Bugs-To: EMAIL@ADDRESS\n" "POT-Creation-Date: 2010-04-22 14:17+0400\n" "PO-Revision-Date: 2010-04-22 14:17-0400\n" "Last-Translator: FULL NAME \n" "Language-Team: de \n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Generated-By: Babel 0.9.5\n" #: deformsite/__init__.py:458 msgid "Approve" msgstr "Genehmigen" #: deformsite/__init__.py:459 msgid "Show approval" msgstr "Zeigen Genehmigung" #: deformsite/__init__.py:466 msgid "Submit" msgstr "Beugen" pyramid_zcml-1.0.0/pyramid_zcml/tests/localeapp/locale/en/LC_MESSAGES/deformsite.mo0000644000175000017500000000103711656047135030037 0ustar tseavertseaverÞ•<\] esz úApproveShow approvalSubmitProject-Id-Version: deformsite 0.0 Report-Msgid-Bugs-To: EMAIL@ADDRESS POT-Creation-Date: 2010-04-22 14:17+0400 PO-Revision-Date: 2010-04-22 14:19-0400 Last-Translator: FULL NAME Language-Team: de Plural-Forms: nplurals=2; plural=(n != 1) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Generated-By: Babel 0.9.5 GenehmigenZeigen GenehmigungBeugenpyramid_zcml-1.0.0/pyramid_zcml/tests/localeapp/__init__.py0000644000175000017500000000001111656047135024013 0ustar tseavertseaver# a file pyramid_zcml-1.0.0/pyramid_zcml/tests/includeoverrideapp/0000775000175000017500000000000012113677651023641 5ustar tseavertseaverpyramid_zcml-1.0.0/pyramid_zcml/tests/includeoverrideapp/__init__.py0000644000175000017500000000001211656047135025740 0ustar tseavertseaver# package pyramid_zcml-1.0.0/pyramid_zcml/tests/includeoverrideapp/sub/0000775000175000017500000000000012113677651024432 5ustar tseavertseaverpyramid_zcml-1.0.0/pyramid_zcml/tests/includeoverrideapp/sub/__init__.py0000644000175000017500000000001211656047135026531 0ustar tseavertseaver# package pyramid_zcml-1.0.0/pyramid_zcml/tests/includeoverrideapp/sub/overrides.zcml0000644000175000017500000000026711656047135027325 0ustar tseavertseaver pyramid_zcml-1.0.0/pyramid_zcml/tests/includeoverrideapp/sub/views.py0000644000175000017500000000013411656047135026134 0ustar tseavertseaverfrom pyramid.response import Response def theview(request): return Response('thesubview') pyramid_zcml-1.0.0/pyramid_zcml/tests/includeoverrideapp/views.py0000644000175000017500000000013011656047135025337 0ustar tseavertseaverfrom pyramid.response import Response def theview(request): return Response('theview') pyramid_zcml-1.0.0/pyramid_zcml/tests/includeoverrideapp/configure.zcml0000644000175000017500000000043211656047135026505 0ustar tseavertseaver pyramid_zcml-1.0.0/pyramid_zcml/tests/permbugapp/0000775000175000017500000000000012113677651022117 5ustar tseavertseaverpyramid_zcml-1.0.0/pyramid_zcml/tests/permbugapp/__init__.py0000644000175000017500000000060212102053340024201 0ustar tseavertseaverfrom pyramid.security import view_execution_permitted from webob import Response from pyramid_zcml._compat import escape def x_view(request): # pragma: no cover return Response('this is private!') def test(context, request): # should return false msg = 'Allow ./x? %s' % repr(view_execution_permitted( context, request, 'x')) return Response(escape(msg)) pyramid_zcml-1.0.0/pyramid_zcml/tests/permbugapp/configure.zcml0000644000175000017500000000050111656047135024760 0ustar tseavertseaver pyramid_zcml-1.0.0/pyramid_zcml/configure.zcml0000644000175000017500000000013611656047135021460 0ustar tseavertseaver pyramid_zcml-1.0.0/README.rst0000644000175000017500000000060711656047135015610 0ustar tseavertseaver``pyramid_zcml`` ================ ``pyramid_zcml`` is a package which provides ZCML (Zope Configuration Markup Language) directives for all "configurator" methods available in the `Pyramid `_ web framework. See `http://docs.pylonsproject.org/projects/pyramid_zcml/dev/ `_ for detailed documentation. pyramid_zcml-1.0.0/CHANGES.txt0000664000175000017500000000645312113673472015737 0ustar tseavertseaver1.0.0 (2013-02-28) ------------------ - Add ``setup.py docs`` alias (installs ``Sphinx`` and dependencies). - Add ``setup.py dev`` alias (runs ``setup.py develop`` plus installs ``nose`` and ``coverage``). - Add support for Python 3.2 and 3.3. - Drop support for Pyramid < 1.4. - Fix for ``xhr`` predicate behaviour: ignore when no ``xhr`` value specified. - Drop support for Python 2.5, Jython. 0.9.2 (2012-02-20) ------------------ - Stop depending on ``pyramid.config.Configurator.with_context``. Moved logic into this package in Pyramid 1.3a9+. - Respect Pyramid 1.3a9+ ``introspection`` Configurator attribute. 0.9.1 (2011-12-14) ------------------ - Readd mistakenly removed ``paste.paster_create_template`` entry point. 0.9 (2011-12-14) ---------------- - Drop dependency on PasteScript (Pyramid 1.3 compat). - Rename "paster_templates" dir to "scaffolds". - Make scaffold compatible with Pyramid 1.3a2+ (use wsgiref). - Drop scaffolding dependency on WebError. - Scaffold now uses ``pyramid#wsgiref`` server instead of ``paste#http`` server. This will require the use of Pyramid 1.0.2, 1.1.3, 1.2.5, or 1.3a2+. 0.8 (2011-12-06) ---------------- - Pyramid 1.3 compatibility. - Depend on ``zope.configuration``>=3.8.0dev in order to prevent misconfigurations involving this package and older versions of zope.configuration. z.config 3.8.0 uses dictionary-based actions (older versions used tuple-based actions). Older versions of z.config will mostly appear to work with this version of pyramid_zcml, except for cases of ZCML which uses the includeOverrides directive; to avoid any confusion caused by this, we upward-pin to 3.8.0dev+. Note that Pyramid 1.0.X, 1.1.X, 1.2.4+ and 1.3 will all still work with the combination of pyramid_zcml 0.8 + zope.configuration 3.8.0. 0.7 (2011-10-07) ---------------- - The ZCML includeOverrides directive did not work properly when ``pyramid_zcml`` 0.6 was used with Pyramid 1.2. Symptom: inappropriate ``ConfigurationConflictError`` errors. See the discussion at http://groups.google.com/group/pylons-devel/browse_thread/thread/e9720c67b8388843?hl=en for more information. 0.6 (2011-09-04) ---------------- - Fix to work under Pyramid 1.2a4 and better. - Depend explicitly on zope.configuration (upcoming releases of Pyramid will not). - Use our a local PyramidConfigurationMachine when collecting ZCML actions, and splice the locally collected actions onto the configurator context's actions when ZCML processing is done. This provides Pyramid the freedom to not rely on zope.configuration in the future, and somewhat futureproofs ``pyramid_zcml`` from changes to action processing in Pyramid. 0.5 (2011-08-24) ---------------- - Compatible with Pyramid 1.2a1. 0.4 (2011-08-17) ---------------- - Fix a unit test failure when used with Venusian 0.9. - Compatible with Pyramid 1.2dev+. 0.3 (2011-07-22) ---------------- - Add tox.ini for testing. - Pyramid 1.1 test suite fixes. 0.2 (2011-02-22) ----------------- - Add ``wild_domain`` argument to authtkauthpolicy directive. - Depend on ``pyramid>=1.0b1`` (``wild_domain`` argument to authtktauthpolicy directive). - Make tests pass on Pyramid 1.0; squash testing deprecation warnings. 0.1 (unknown) ------------- - Initial release, all ZCML directives broken out of Pyramid core. pyramid_zcml-1.0.0/docs/0000775000175000017500000000000012113677651015051 5ustar tseavertseaverpyramid_zcml-1.0.0/docs/zcml/0000775000175000017500000000000012113677651016016 5ustar tseavertseaverpyramid_zcml-1.0.0/docs/zcml/configure.rst0000644000175000017500000000450511656047135020532 0ustar tseavertseaver.. _configure_directive: ``configure`` ------------- Because :term:`ZCML` is XML, and because XML requires a single root tag for each document, every ZCML file used by Pyramid must contain a ``configure`` container directive, which acts as the root XML tag. It is a "container" directive because its only job is to contain other directives. Attributes ~~~~~~~~~~ ``xmlns`` The default XML namespace used for subdirectives. Example ~~~~~~~ .. code-block:: xml :linenos: .. _word_on_xml_namespaces: A Word On XML Namespaces ~~~~~~~~~~~~~~~~~~~~~~~~ Usually, the start tag of the ```` container tag has a default *XML namespace* associated with it. This is usually ``http://pylonshq.com/pyramid``, named by the ``xmlns`` attribute of the ``configure`` start tag. Using the ``http://pylonshq.com/pyramid`` namespace as the default XML namespace isn't strictly necessary; you can use a different default namespace as the default. However, if you do, the declaration tags which are defined by Pyramid such as the ``view`` declaration tag will need to be defined in such a way that the XML parser that Pyramid uses knows which namespace the :mod:`pyramid` tags are associated with. For example, the following files are all completely equivalent: .. topic:: Use of A Non-Default XML Namespace .. code-block:: xml :linenos: .. topic:: Use of A Per-Tag XML Namespace Without A Default XML Namespace .. code-block:: xml :linenos: For more information about XML namespaces, see `this older, but simple XML.com article `_. The conventions in this document assume that the default XML namespace is ``http://pylonshq.com/pyramid``. Alternatives ~~~~~~~~~~~~ None. See Also ~~~~~~~~ See also :ref:`helloworld_declarative`. pyramid_zcml-1.0.0/docs/zcml/subscriber.rst0000644000175000017500000000216311656047135020712 0ustar tseavertseaver.. _subscriber_directive: ``subscriber`` -------------- The ``subscriber`` ZCML directive configures an :term:`subscriber` callable to listen for events broadcast by the Pyramid web framework. Attributes ~~~~~~~~~~ ``for`` The class or :term:`interface` that you are subscribing the listener for, e.g. :class:`pyramid.events.NewRequest`. Registering a subscriber for a specific class or interface limits the event types that the subscriber will receive to those specified by the interface or class. Default: ``zope.interface.Interface`` (implying *any* event type). ``handler`` A :term:`dotted Python name` which references an event handler callable. The callable should accept a single argument: ``event``. The return value of the callable is ignored. Examples ~~~~~~~~ .. code-block:: xml :linenos: Alternatives ~~~~~~~~~~~~ You can also register an event listener by using the :meth:`pyramid.config.Configurator.add_subscriber` method. See Also ~~~~~~~~ See also :ref:`events_chapter`. pyramid_zcml-1.0.0/docs/zcml/adapter.rst0000644000175000017500000000143211656047135020165 0ustar tseavertseaver.. _adapter_directive: ``adapter`` ----------- Register a :term:`Zope Component Architecture` "adapter". Attributes ~~~~~~~~~~ ``factory`` The adapter factory (often a class). ``provides`` The :term:`interface` that an adapter instance resulting from a lookup will provide. ``for`` Interfaces or classes to be adapted, separated by spaces, e.g. ``interfaces.IFoo interfaces.IBar``. ``name`` The adapter name. Example ~~~~~~~ .. code-block:: xml :linenos: Alternatives ~~~~~~~~~~~~ Use the ``registerAdapter`` method of the ``registry`` attribute of a :term:`Configurator` instance during initial application setup. See Also ~~~~~~~~ None. pyramid_zcml-1.0.0/docs/zcml/utility.rst0000644000175000017500000000143511656047135020253 0ustar tseavertseaver.. _utility_directive: ``utility`` ----------- Register a :term:`Zope Component Architecture` "utility". Attributes ~~~~~~~~~~ ``component`` The utility component (cannot be specified if ``factory`` is specified). ``factory`` A factory that creates a component (cannot be specified if ``component`` is specified). ``provides`` The :term:`interface` that an utility instance resulting from a lookup will provide. ``name`` The utility name. Example ~~~~~~~ .. code-block:: xml :linenos: Alternatives ~~~~~~~~~~~~ Use the ``registerUtility`` method of the ``registry`` attribute of a :term:`Configurator` instance during initial application setup. See Also ~~~~~~~~ None. pyramid_zcml-1.0.0/docs/zcml/scan.rst0000644000175000017500000000126511656047135017475 0ustar tseavertseaver.. _scan_directive: ``scan`` -------- To make use of :term:`configuration decoration` decorators, you must perform a :term:`scan`. A scan finds these decorators in code. The ``scan`` ZCML directive tells Pyramid to begin such a scan. Attributes ~~~~~~~~~~ ``package`` The package to scan or the single dot (``.``), meaning the "current" package (the package in which the ZCML file lives). Example ~~~~~~~ .. code-block:: xml :linenos: Alternatives ~~~~~~~~~~~~ The :meth:`pyramid.config.Configurator.scan` method performs the same job as the ``scan`` ZCML directive. See Also ~~~~~~~~ See also :ref:`mapping_views_using_a_decorator_section`. pyramid_zcml-1.0.0/docs/zcml/translationdir.rst0000644000175000017500000000220711656047135021603 0ustar tseavertseaver.. _translationdir_directive: ``translationdir`` ------------------ Add a :term:`gettext` :term:`translation directory` to the current configuration for use in localization of text. Attributes ~~~~~~~~~~ ``dir`` The path to the translation directory. This path may either be 1) absolute (e.g. ``/foo/bar/baz``) 2) Python-package-relative (e.g. ``packagename:foo/bar/baz``) or 3) relative to the package directory in which the ZCML file which contains the directive (e.g. ``foo/bar/baz``). Example 1 ~~~~~~~~~ .. code-block:: xml :linenos: Example 2 ~~~~~~~~~ .. code-block:: xml :linenos: Example 3 ~~~~~~~~~ .. code-block:: xml :linenos: Alternatives ~~~~~~~~~~~~ Use :meth:`pyramid.config.Configurator.add_translation_dirs` method instance during initial application setup. See Also ~~~~~~~~ See also :ref:`activating_translation`. pyramid_zcml-1.0.0/docs/zcml/localenegotiator.rst0000644000175000017500000000146011656047135022101 0ustar tseavertseaver.. _localenegotiator_directive: ``localenegotiator`` -------------------- Set the :term:`locale negotiator` for the current configurator to support localization of text. Attributes ~~~~~~~~~~ ``negotiator`` The :term:`dotted Python name` to a :term:`locale negotiator` implementation. This attribute is required. If it begins with a dot (``.``), the name will be considered relative to the directory in which the ZCML file which contains this directive lives. Example ~~~~~~~ .. code-block:: xml :linenos: Alternatives ~~~~~~~~~~~~ Use :meth:`pyramid.config.Configurator.set_locale_negotiator` method instance during initial application setup. See Also ~~~~~~~~ See also :ref:`activating_translation`. pyramid_zcml-1.0.0/docs/zcml/aclauthorizationpolicy.rst0000644000175000017500000000130511656047135023344 0ustar tseavertseaver.. _aclauthorizationpolicy_directive: ``aclauthorizationpolicy`` -------------------------- When this directive is used, authorization information is obtained from :term:`ACL` objects attached to :term:`resource` objects. Attributes ~~~~~~~~~~ None. Example ~~~~~~~ .. code-block:: xml :linenos: Alternatives ~~~~~~~~~~~~ You may create an instance of the :class:`pyramid.authorization.ACLAuthorizationPolicy` and pass it to the :class:`pyramid.config.Configurator` constructor as the ``authorization_policy`` argument during initial application configuration. See Also ~~~~~~~~ See also :ref:`authorization_policies_directives_section` and :ref:`security_chapter`. pyramid_zcml-1.0.0/docs/zcml/static.rst0000644000175000017500000000516011656047135020036 0ustar tseavertseaver.. _static_directive: ``static`` ---------- Use of the ``static`` ZCML directive or allows you to serve static resources (such as JavaScript and CSS files) within a Pyramid application. This mechanism makes static files available at a name relative to the application root URL. Attributes ~~~~~~~~~~ ``name`` The (application-root-relative) URL prefix of the static directory. For example, to serve static files from ``/static`` in most applications, you would provide a ``name`` of ``static``. ``path`` A path to a directory on disk where the static files live. This path may either be 1) absolute (e.g. ``/foo/bar/baz``) 2) Python-package-relative (e.g. (``packagename:foo/bar/baz``) or 3) relative to the package directory in which the ZCML file which contains the directive (e.g. ``foo/bar/baz``). ``cache_max_age`` The number of seconds that the static resource can be cached, as represented in the returned response's ``Expires`` and/or ``Cache-Control`` headers, when any static file is served from this directive. This defaults to 3600 (5 minutes). Optional. ``permission`` Used to specify the :term:`permission` required by a user to execute this static view. This value defaults to the string ``__no_permission_required__``. The ``__no_permission_required__`` string is a special sentinel which indicates that, even if a :term:`default permission` exists for the current application, the static view should be renderered to completely anonymous users. This default value is permissive because, in most web apps, static resources seldom need protection from viewing. You should use this option only if you register a static view which points at a directory that contains resources which should be shown only if the calling user has (according to the :term:`authorization policy`) a particular permission. Examples ~~~~~~~~ .. topic:: Serving Static Files from an Absolute Path .. code-block:: xml :linenos: .. topic:: Serving Static Files from a Package-Relative Path .. code-block:: xml :linenos: .. topic:: Serving Static Files from a Current-Package-Relative Path .. code-block:: xml :linenos: Alternatives ~~~~~~~~~~~~ :meth:`pyramid.config.Configurator.add_static_view` can also be used to add a static view. See Also ~~~~~~~~ See also :ref:`static_assets_section` and :ref:`generating_static_asset_urls`. pyramid_zcml-1.0.0/docs/zcml/repozewho1authenticationpolicy.rst0000644000175000017500000000315011656047135025027 0ustar tseavertseaver.. _repozewho1authenticationpolicy_directive: ``repozewho1authenticationpolicy`` ---------------------------------- When this directive is used, authentication information is obtained from a ``repoze.who.identity`` key in the WSGI environment, assumed to be set by :term:`repoze.who` middleware. Attributes ~~~~~~~~~~ ``identifier_name`` The ``identifier_name`` controls the name used to look up the :term:`repoze.who` "identifier" plugin within ``request.environ['repoze.who.plugins']`` which is used by this policy to "remember" and "forget" credentials. It defaults to ``auth_tkt``. ``callback`` The ``callback`` is a Python dotted name to a function passed the repoze.who identity and the request as positional arguments. The callback is expected to return None if the user represented by the identity doesn't exist or a sequence of group identifiers (possibly empty) if the user does exist. If ``callback`` is None, the userid will be assumed to exist with no groups. It defaults to ``None``. Example ~~~~~~~ .. code-block:: xml :linenos: Alternatives ~~~~~~~~~~~~ You may create an instance of the :class:`pyramid.authentication.RepozeWho1AuthenticationPolicy` and pass it to the :class:`pyramid.config.Configurator` constructor as the ``authentication_policy`` argument during initial application configuration. See Also ~~~~~~~~ See also :ref:`authentication_policies_directives_section` and :class:`pyramid.authentication.RepozeWho1AuthenticationPolicy`. pyramid_zcml-1.0.0/docs/zcml/include.rst0000644000175000017500000000304411656047135020171 0ustar tseavertseaver.. _include_directive: ``include`` ----------- The ``include`` directive includes configuration from an external ZCML file. Use of the ``include`` tag allows a user to split configuration across multiple ZCML files, and allows package distributors to provide default ZCML configuration for specific purposes which can be included by the integrator of the package as necessary. Attributes ~~~~~~~~~~ ``package`` A :term:`dotted Python name` which references a Python :term:`package`. ``file`` An absolute or relative filename which references a ZCML file. The ``package`` and ``file`` attributes can be used together or separately as necessary. Examples ~~~~~~~~ .. topic:: Loading the File Named ``configure.zcml`` from a Package Implicitly .. code-block:: xml :linenos: .. topic:: Loading the File Named ``other.zcml`` From the Current Package .. code-block:: xml :linenos: .. topic:: Loading a File From a Subdirectory of the Current Package .. code-block:: xml :linenos: .. topic:: Loading the File Named ``/absolute/path/other.zcml`` .. code-block:: xml :linenos: .. topic:: Loading the File Named ``other.zcml`` From a Package Explicitly .. code-block:: xml :linenos: Alternatives ~~~~~~~~~~~~ None. See Also ~~~~~~~~ See also :ref:`helloworld_declarative`. pyramid_zcml-1.0.0/docs/zcml/default_permission.rst0000644000175000017500000000276111656047135022447 0ustar tseavertseaver.. _default_permission_directive: ``default_permission`` ------------------------------- Set the default permission to be used by all :term:`view configuration` registrations. This directive accepts a single attribute ,``name``, which should be used as the default permission string. An example of a permission string: ``view``. Adding a default permission makes it unnecessary to protect each view configuration with an explicit permission, unless your application policy requires some exception for a particular view. If a default permission is *not* set, views represented by view configuration registrations which do not explicitly declare a permission will be executable by entirely anonymous users (any authorization policy is ignored). There can be only one default permission active at a time within an application, thus the ``default_permission`` directive can only be used once in any particular set of ZCML. Attributes ~~~~~~~~~~ ``name`` Must be a string representing a :term:`permission`, e.g. ``view``. Example ~~~~~~~ .. code-block:: xml :linenos: Alternatives ~~~~~~~~~~~~ Using the ``default_permission`` argument to the :class:`pyramid.config.Configurator` constructor can be used to achieve the same purpose. Using the :meth:`pyramid.config.Configurator.set_default_permission` method can be used to achieve the same purpose when using imperative configuration. See Also ~~~~~~~~ See also :ref:`setting_a_default_permission`. pyramid_zcml-1.0.0/docs/zcml/renderer.rst0000644000175000017500000000172111656047135020354 0ustar tseavertseaver.. _renderer_directive: ``renderer`` ------------ The ``renderer`` ZCML directive can be used to override an existing existing :term:`renderer` or to add a new renderer. Attributes ~~~~~~~~~~ ``factory`` A :term:`dotted Python name` referencing a callable object that accepts a renderer name and returns a :term:`renderer` object. ``name`` The renderer name, which is a string. Examples ~~~~~~~~ .. topic:: Registering a Non-Template Renderer .. code-block:: xml :linenos: .. topic:: Registering a Template Renderer .. code-block:: xml :linenos: Alternatives ~~~~~~~~~~~~ The :meth:`pyramid.config.Configurator.add_renderer` method is equivalent to the ``renderer`` ZCML directive. See Also ~~~~~~~~ See also :ref:`adding_and_overriding_renderers`. pyramid_zcml-1.0.0/docs/zcml/notfound.rst0000644000175000017500000000474311656047135020411 0ustar tseavertseaver.. _notfound_directive: ``notfound`` ------------ .. warning:: The ``notfound`` ZCML directive is deprecated in Pyramid version 1.0. Instead, you should use the :ref:`view_directive` directive with a ``context`` that names the :exc:`pyramid.exceptions.NotFound` class. See :ref:`changing_the_notfound_view` form more information. When Pyramid can't map a URL to view code, it invokes a :term:`not found view`. The default not found view is very plain, but the view callable used can be configured via the ``notfound`` ZCML tag. Attributes ~~~~~~~~~~ ``view`` The :term:`dotted Python name` to a :term:`view callable`. This attribute is required unless a ``renderer`` attribute also exists. If a ``renderer`` attribute exists on the directive, this attribute defaults to a view that returns an empty dictionary (see :ref:`views_which_use_a_renderer`). ``attr`` The attribute of the view callable to use if ``__call__`` is not correct (has the same meaning as in the context of :ref:`view_directive`; see the description of ``attr`` there). ``renderer`` This is either a single string term (e.g. ``json``) or a string implying a path or :term:`asset specification` (e.g. ``templates/views.pt``) used when the view returns a non-:term:`response` object. This attribute has the same meaning as it would in the context of :ref:`view_directive`; see the description of ``renderer`` there). ``wrapper`` The :term:`view name` (*not* an object dotted name) of another view declared elsewhere in ZCML (or via the ``@view_config`` decorator) which will receive the response body of this view as the ``request.wrapped_body`` attribute of its own request, and the response returned by this view as the ``request.wrapped_response`` attribute of its own request. This attribute has the same meaning as it would in the context of :ref:`view_directive`; see the description of ``wrapper`` there). Note that the wrapper view *should not* be protected by any permission; behavior is undefined if it does. Example ~~~~~~~ .. code-block:: xml :linenos: Alternatives ~~~~~~~~~~~~ Use the :ref:`view_directive` directive with a ``context`` that names the :exc:`pyramid.exceptions.NotFound` class. Use the :meth:`pyramid.config.Configurator.add_view` method, passing it a ``context`` which is the :exc:`pyramid.exceptions.NotFound` class. See Also ~~~~~~~~ See also :ref:`changing_the_notfound_view`. pyramid_zcml-1.0.0/docs/zcml/authtktauthenticationpolicy.rst0000644000175000017500000000771511656047135024423 0ustar tseavertseaver.. _authtktauthenticationpolicy_directive: ``authtktauthenticationpolicy`` ------------------------------- When this directive is used, authentication information is obtained from an :mod:`paste.auth.auth_tkt` cookie value, assumed to be set by a custom login form. Attributes ~~~~~~~~~~ ``secret`` The ``secret`` is a string that will be used to sign the data stored by the cookie. It is required and has no default. ``callback`` The ``callback`` is a Python dotted name to a function passed the string representing the userid stored in the cookie and the request as positional arguments. The callback is expected to return None if the user represented by the string doesn't exist or a sequence of group identifiers (possibly empty) if the user does exist. If ``callback`` is None, the userid will be assumed to exist with no groups. It defaults to ``None``. ``cookie_name`` The ``cookie_name`` is the name used for the cookie that contains the user information. It defaults to ``auth_tkt``. ``secure`` ``secure`` is a boolean value. If it's set to "true", the cookie will only be sent back by the browser over a secure (HTTPS) connection. It defaults to "false". ``include_ip`` ``include_ip`` is a boolean value. If it's set to true, the requesting IP address is made part of the authentication data in the cookie; if the IP encoded in the cookie differs from the IP of the requesting user agent, the cookie is considered invalid. It defaults to "false". ``timeout`` ``timeout`` is an integer value. It represents the maximum age in seconds which the auth_tkt ticket will be considered valid. If ``timeout`` is specified, and ``reissue_time`` is also specified, ``reissue_time`` must be a smaller value than ``timeout``. It defaults to ``None``, meaning that the ticket will be considered valid forever. ``reissue_time`` ``reissue_time`` is an integer value. If ``reissue_time`` is specified, when we encounter a cookie that is older than the reissue time (in seconds), but younger that the ``timeout``, a new cookie will be issued. It defaults to ``None``, meaning that authentication cookies are never reissued. A value of ``0`` means reissue a cookie in the response to every request that requires authentication. ``max_age`` ``max_age`` is the maximum age of the auth_tkt *cookie*, in seconds. This differs from ``timeout`` inasmuch as ``timeout`` represents the lifetime of the ticket contained in the cookie, while this value represents the lifetime of the cookie itself. When this value is set, the cookie's ``Max-Age`` and ``Expires`` settings will be set, allowing the auth_tkt cookie to last between browser sessions. It is typically nonsensical to set this to a value that is lower than ``timeout`` or ``reissue_time``, although it is not explicitly prevented. It defaults to ``None``, meaning (on all major browser platforms) that auth_tkt cookies will last for the lifetime of the user's browser session. ``wild_domain`` A boolean value. If it's set to "true", a cookie with a "wild" domain value will only be sent back by the browser during ``remember``. It defaults to "true". Example ~~~~~~~ .. code-block:: xml :linenos: Alternatives ~~~~~~~~~~~~ You may create an instance of the :class:`pyramid.authentication.AuthTktAuthenticationPolicy` and pass it to the :class:`pyramid.config.Configurator` constructor as the ``authentication_policy`` argument during initial application configuration. See Also ~~~~~~~~ See also :ref:`authentication_policies_directives_section` and :class:`pyramid.authentication.AuthTktAuthenticationPolicy`. pyramid_zcml-1.0.0/docs/zcml/route.rst0000644000175000017500000002361211656047135017707 0ustar tseavertseaver.. _route_directive: ``route`` --------- The ``route`` directive adds a single :term:`route configuration` to the :term:`application registry`. Attributes ~~~~~~~~~~ ``pattern`` The pattern of the route e.g. ``ideas/{idea}``. This attribute is required. See :ref:`route_pattern_syntax` for information about the syntax of route patterns. .. note:: For backwards compatibility purposes, the ``path`` attribute can also be used instead of ``pattern``. ``name`` The name of the route, e.g. ``myroute``. This attribute is required. It must be unique among all defined routes in a given configuration. ``factory`` The :term:`dotted Python name` to a function that will generate a Pyramid context object when this route matches. e.g. ``mypackage.resources.MyResource``. If this argument is not specified, a default root factory will be used. ``view`` The :term:`dotted Python name` to a function that will be used as a view callable when this route matches. e.g. ``mypackage.views.my_view``. ``xhr`` This value should be either ``True`` or ``False``. If this value is specified and is ``True``, the :term:`request` must possess an ``HTTP_X_REQUESTED_WITH`` (aka ``X-Requested-With``) header for this route to match. This is useful for detecting AJAX requests issued from jQuery, Prototype and other Javascript libraries. If this predicate returns false, route matching continues. ``traverse`` If you would like to cause the :term:`context` to be something other than the :term:`root` object when this route matches, you can spell a traversal pattern as the ``traverse`` argument. This traversal pattern will be used as the traversal path: traversal will begin at the root object implied by this route (either the global root, or the object returned by the ``factory`` associated with this route). The syntax of the ``traverse`` argument is the same as it is for ``pattern``. For example, if the ``pattern`` provided to the ``route`` directive is ``articles/{article}/edit``, and the ``traverse`` argument provided to the ``route`` directive is ``/{article}``, when a request comes in that causes the route to match in such a way that the ``article`` match value is '1' (when the request URI is ``/articles/1/edit``), the traversal path will be generated as ``/1``. This means that the root object's ``__getitem__`` will be called with the name ``1`` during the traversal phase. If the ``1`` object exists, it will become the :term:`context` of the request. :ref:`traversal_chapter` has more information about traversal. If the traversal path contains segment marker names which are not present in the ``pattern`` argument, a runtime error will occur. The ``traverse`` pattern should not contain segment markers that do not exist in the ``pattern``. A similar combining of routing and traversal is available when a route is matched which contains a ``*traverse`` remainder marker in its ``pattern`` (see :ref:`using_traverse_in_a_route_pattern`). The ``traverse`` argument to the ``route`` directive allows you to associate route patterns with an arbitrary traversal path without using a a ``*traverse`` remainder marker; instead you can use other match information. Note that the ``traverse`` argument to the ``route`` directive is ignored when attached to a route that has a ``*traverse`` remainder marker in its pattern. ``request_method`` A string representing an HTTP method name, e.g. ``GET``, ``POST``, ``HEAD``, ``DELETE``, ``PUT``. If this argument is not specified, this route will match if the request has *any* request method. If this predicate returns false, route matching continues. ``path_info`` The value of this attribute represents a regular expression pattern that will be tested against the ``PATH_INFO`` WSGI environment variable. If the regex matches, this predicate will be true. If this predicate returns false, route matching continues. ``request_param`` This value can be any string. A view declaration with this attribute ensures that the associated route will only match when the request has a key in the ``request.params`` dictionary (an HTTP ``GET`` or ``POST`` variable) that has a name which matches the supplied value. If the value supplied to the attribute has a ``=`` sign in it, e.g. ``request_params="foo=123"``, then the key (``foo``) must both exist in the ``request.params`` dictionary, and the value must match the right hand side of the expression (``123``) for the route to "match" the current request. If this predicate returns false, route matching continues. ``header`` The value of this attribute represents an HTTP header name or a header name/value pair. If the value contains a ``:`` (colon), it will be considered a name/value pair (e.g. ``User-Agent:Mozilla/.*`` or ``Host:localhost``). The *value* of an attribute that represent a name/value pair should be a regular expression. If the value does not contain a colon, the entire value will be considered to be the header name (e.g. ``If-Modified-Since``). If the value evaluates to a header name only without a value, the header specified by the name must be present in the request for this predicate to be true. If the value evaluates to a header name/value pair, the header specified by the name must be present in the request *and* the regular expression specified as the value must match the header value. Whether or not the value represents a header name or a header name/value pair, the case of the header name is not significant. If this predicate returns false, route matching continues. ``accept`` The value of this attribute represents a match query for one or more mimetypes in the ``Accept`` HTTP request header. If this value is specified, it must be in one of the following forms: a mimetype match token in the form ``text/plain``, a wildcard mimetype match token in the form ``text/*`` or a match-all wildcard mimetype match token in the form ``*/*``. If any of the forms matches the ``Accept`` header of the request, this predicate will be true. If this predicate returns false, route matching continues. ``custom_predicates`` This value should be a sequence of references to custom predicate callables. Use custom predicates when no set of predefined predicates does what you need. Custom predicates can be combined with predefined predicates as necessary. Each custom predicate callable should accept two arguments: ``info`` and ``request`` and should return either ``True`` or ``False`` after doing arbitrary evaluation of the info and/or the request. If all custom and non-custom predicate callables return ``True`` the associated route will be considered viable for a given request. If any predicate callable returns ``False``, route matching continues. Note that the value ``info`` passed to a custom route predicate is a dictionary containing matching information; see :ref:`custom_route_predicates` for more information about ``info``. ``view_context`` The :term:`dotted Python name` to a class or an interface that the :term:`context` of the view should match for the view named by the route to be used. This attribute is only useful if the ``view`` attribute is used. If this attribute is not specified, the default (``None``) will be used. If the ``view`` attribute is not provided, this attribute has no effect. This attribute can also be spelled as ``view_for`` or ``for_``; these are valid older spellings. ``view_permission`` The permission name required to invoke the view associated with this route. e.g. ``edit``. (see :ref:`using_security_with_urldispatch` for more information about permissions). If the ``view`` attribute is not provided, this attribute has no effect. This attribute can also be spelled as ``permission``. ``view_renderer`` This is either a single string term (e.g. ``json``) or a string implying a path or :term:`asset specification` (e.g. ``templates/views.pt``). If the renderer value is a single term (does not contain a dot ``.``), the specified term will be used to look up a renderer implementation, and that renderer implementation will be used to construct a response from the view return value. If the renderer term contains a dot (``.``), the specified term will be treated as a path, and the filename extension of the last element in the path will be used to look up the renderer implementation, which will be passed the full path. The renderer implementation will be used to construct a response from the view return value. See :ref:`views_which_use_a_renderer` for more information. If the ``view`` attribute is not provided, this attribute has no effect. This attribute can also be spelled as ``renderer``. ``view_attr`` The view machinery defaults to using the ``__call__`` method of the view callable (or the function itself, if the view callable is a function) to obtain a response dictionary. The ``attr`` value allows you to vary the method attribute used to obtain the response. For example, if your view was a class, and the class has a method named ``index`` and you wanted to use this method instead of the class' ``__call__`` method to return the response, you'd say ``attr="index"`` in the view configuration for the view. This is most useful when the view definition is a class. If the ``view`` attribute is not provided, this attribute has no effect. ``use_global_views`` When a request matches this route, and view lookup cannot find a view which has a 'route_name' predicate argument that matches the route, try to fall back to using a view that otherwise matches the context, request, and view name (but does not match the route name predicate). Alternatives ~~~~~~~~~~~~ You can also add a :term:`route configuration` via: - Using the :meth:`pyramid.config.Configurator.add_route` method. See Also ~~~~~~~~ See also :ref:`urldispatch_chapter`. pyramid_zcml-1.0.0/docs/zcml/view.rst0000644000175000017500000002715011656047135017524 0ustar tseavertseaver.. _view_directive: ``view`` -------- A ``view`` declaration directs Pyramid to create a single :term:`view configuration` registration in the current :term:`application registry`. The ``view`` ZCML directive has many possible attributes. Some of the attributes are descriptive or influence rendering. Other attributes are :term:`predicate` attributes, meaning that they imply an evaluation to true or false when view lookup is performed. *All* predicates named in a view configuration must evaluate to true in order for the view callable it names to be considered "invokable" for a given request. See :ref:`view_lookup` for a description of how a view configuration matches (or doesn't match) during a request. The possible attributes of the ``view`` ZCML directive are described below. They are divided into predicate and non-predicate categories. Attributes ~~~~~~~~~~ Non-Predicate Attributes ######################## ``view`` The :term:`dotted Python name` to a :term:`view callable`. This attribute is required unless a ``renderer`` attribute also exists. If a ``renderer`` attribute exists on the directive, this attribute defaults to a view that returns an empty dictionary (see :ref:`views_which_use_a_renderer`). ``permission`` The name of a *permission* that the user must possess in order to call the view. See :ref:`view_security_section` for more information about view security and permissions. ``attr`` The view machinery defaults to using the ``__call__`` method of the view callable (or the function itself, if the view callable is a function) to obtain a response dictionary. The ``attr`` value allows you to vary the method attribute used to obtain the response. For example, if your view was a class, and the class has a method named ``index`` and you wanted to use this method instead of the class' ``__call__`` method to return the response, you'd say ``attr="index"`` in the view configuration for the view. This is most useful when the view definition is a class. ``renderer`` This is either a single string term (e.g. ``json``) or a string implying a path or :term:`asset specification` (e.g. ``templates/views.pt``). If the renderer value is a single term (does not contain a dot ``.``), the specified term will be used to look up a renderer implementation, and that renderer implementation will be used to construct a response from the view return value. If the renderer term contains a dot (``.``), the specified term will be treated as a path, and the filename extension of the last element in the path will be used to look up the renderer implementation, which will be passed the full path. The renderer implementation will be used to construct a response from the view return value. Note that if the view itself returns a response (see :ref:`the_response`), the specified renderer implementation is never called. When the renderer is a path, although a path is usually just a simple relative pathname (e.g. ``templates/foo.pt``, implying that a template named "foo.pt" is in the "templates" directory relative to the directory in which the ZCML file is defined), a path can be absolute, starting with a slash on UNIX or a drive letter prefix on Windows. The path can alternately be a :term:`asset specification` in the form ``some.dotted.package_name:relative/path``, making it possible to address template assets which live in a separate package. The ``renderer`` attribute is optional. If it is not defined, the "null" renderer is assumed (no rendering is performed and the value is passed back to the upstream BFG machinery unmolested). ``wrapper`` The :term:`view name` (*not* an object dotted name) of another view declared elsewhere in ZCML (or via the ``@view_config`` decorator) which will receive the response body of this view as the ``request.wrapped_body`` attribute of its own request, and the response returned by this view as the ``request.wrapped_response`` attribute of its own request. Using a wrapper makes it possible to "chain" views together to form a composite response. The response of the outermost wrapper view will be returned to the user. The wrapper view will be found as any view is found: see :ref:`view_lookup`. The "best" wrapper view will be found based on the lookup ordering: "under the hood" this wrapper view is looked up via ``pyramid.view.render_view_to_response(context, request, 'wrapper_viewname')``. The context and request of a wrapper view is the same context and request of the inner view. If this attribute is unspecified, no view wrapping is done. Predicate Attributes #################### ``name`` The *view name*. Read the :ref:`traversal_chapter` to understand the concept of a view name. ``context`` A :term:`dotted Python name` representing the Python class that the :term:`context` must be an instance of, *or* the :term:`interface` that the :term:`context` must provide in order for this view to be found and called. This predicate is true when the :term:`context` is an instance of the represented class or if the :term:`context` provides the represented interface; it is otherwise false. An alternate name for this attribute is ``for`` (this is an older spelling). ``route_name`` *This attribute services an advanced feature that isn't often used unless you want to perform traversal after a route has matched.* This value must match the ``name`` of a ```` declaration (see :ref:`urldispatch_chapter`) that must match before this view will be called. Note that the ``route`` configuration referred to by ``route_name`` usually has a ``*traverse`` token in the value of its ``path``, representing a part of the path that will be used by traversal against the result of the route's :term:`root factory`. See :ref:`hybrid_chapter` for more information on using this advanced feature. ``request_type`` This value should be a :term:`dotted Python name` string representing the :term:`interface` that the :term:`request` must have in order for this view to be found and called. The presence of this attribute is largely for backwards compatibility with older iterations of this framework. ``request_method`` This value can either be one of the strings 'GET', 'POST', 'PUT', 'DELETE', or 'HEAD' representing an HTTP ``REQUEST_METHOD``. A view declaration with this attribute ensures that the view will only be called when the request's ``method`` (aka ``REQUEST_METHOD``) string matches the supplied value. ``request_param`` This value can be any string. A view declaration with this attribute ensures that the view will only be called when the request has a key in the ``request.params`` dictionary (an HTTP ``GET`` or ``POST`` variable) that has a name which matches the supplied value. If the value supplied to the attribute has a ``=`` sign in it, e.g. ``request_params="foo=123"``, then the key (``foo``) must both exist in the ``request.params`` dictionary, and the value must match the right hand side of the expression (``123``) for the view to "match" the current request. ``containment`` This value should be a :term:`dotted Python name` string representing the class that a graph traversal parent object of the :term:`context` must be an instance of (or :term:`interface` that a parent object must provide) in order for this view to be found and called. Your resources must be "location-aware" to use this feature. See :ref:`location_aware` for more information about location-awareness. ``xhr`` This value should be either ``True`` or ``False``. If this value is specified and is ``True``, the :term:`request` must possess an ``HTTP_X_REQUESTED_WITH`` (aka ``X-Requested-With``) header that has the value ``XMLHttpRequest`` for this view to be found and called. This is useful for detecting AJAX requests issued from jQuery, Prototype and other Javascript libraries. ``accept`` The value of this attribute represents a match query for one or more mimetypes in the ``Accept`` HTTP request header. If this value is specified, it must be in one of the following forms: a mimetype match token in the form ``text/plain``, a wildcard mimetype match token in the form ``text/*`` or a match-all wildcard mimetype match token in the form ``*/*``. If any of the forms matches the ``Accept`` header of the request, this predicate will be true. ``header`` The value of this attribute represents an HTTP header name or a header name/value pair. If the value contains a ``:`` (colon), it will be considered a name/value pair (e.g. ``User-Agent:Mozilla/.*`` or ``Host:localhost``). The *value* of an attribute that represent a name/value pair should be a regular expression. If the value does not contain a colon, the entire value will be considered to be the header name (e.g. ``If-Modified-Since``). If the value evaluates to a header name only without a value, the header specified by the name must be present in the request for this predicate to be true. If the value evaluates to a header name/value pair, the header specified by the name must be present in the request *and* the regular expression specified as the value must match the header value. Whether or not the value represents a header name or a header name/value pair, the case of the header name is not significant. ``path_info`` The value of this attribute represents a regular expression pattern that will be tested against the ``PATH_INFO`` WSGI environment variable. If the regex matches, this predicate will be true. ``custom_predicates`` This value should be a sequence of references to custom predicate callables (e.g. ``dotted.name.one dotted.name.two``, if used in ZCML; a :term:`dotted Python name` to each callable separated by a space). Use custom predicates when no set of predefined predicates do what you need. Custom predicates can be combined with predefined predicates as necessary. Each custom predicate callable should accept two arguments: ``context`` and ``request`` and should return either ``True`` or ``False`` after doing arbitrary evaluation of the context and/or the request. If all callables return ``True``, the associated view callable will be considered viable for a given request. ``decorator`` A :term:`dotted Python name` to a function that will be used to decorate the registered :term:`view callable`. The decorator function will be called with the view callable as a single argument. The view callable it is passed will accept ``(context, request)``. The decorator must return a replacement view callable which also accepts ``(context, request)``. ``mapper`` A :term:`dotted Python name` which refers to a :term:`view mapper`, or ``None``. By default it is ``None``, which indicates that the view should use the default view mapper. This plug-point is useful for Pyramid extension developers, but it's not very useful for 'civilians' who are just developing stock Pyramid applications. Examples ~~~~~~~~ .. topic:: Registering A Default View for a Class .. code-block:: xml :linenos: .. topic:: Registering A View With a Predicate .. code-block:: xml :linenos: Alternatives ~~~~~~~~~~~~ You can also add a :term:`view configuration` via: - Using the :class:`pyramid.view.view_config` class as a decorator. - Using the :meth:`pyramid.config.Configurator.add_view` method. See Also ~~~~~~~~ See also :ref:`views_chapter`. pyramid_zcml-1.0.0/docs/zcml/forbidden.rst0000644000175000017500000000510311656047135020500 0ustar tseavertseaver.. _forbidden_directive: ``forbidden`` ------------- When Pyramid can't authorize execution of a view based on the :term:`authorization policy` in use, it invokes a :term:`forbidden view`. The default forbidden response has a 401 status code and is very plain, but it can be overridden as necessary using the ``forbidden`` ZCML directive. .. warning:: The ``forbidden`` ZCML directive is deprecated in Pyramid version 1.3. Instead, you should use the :ref:`view_directive` directive with a ``context`` that names the :exc:`pyramid.exceptions.Forbidden` class. See :ref:`changing_the_forbidden_view` form more information. Attributes ~~~~~~~~~~ ``view`` The :term:`dotted Python name` to a :term:`view callable`. This attribute is required unless a ``renderer`` attribute also exists. If a ``renderer`` attribute exists on the directive, this attribute defaults to a view that returns an empty dictionary (see :ref:`views_which_use_a_renderer`). ``attr`` The attribute of the view callable to use if ``__call__`` is not correct (has the same meaning as in the context of :ref:`view_directive`; see the description of ``attr`` there). ``renderer`` This is either a single string term (e.g. ``json``) or a string implying a path or :term:`asset specification` (e.g. ``templates/views.pt``) used when the view returns a non-:term:`response` object. This attribute has the same meaning as it would in the context of :ref:`view_directive`; see the description of ``renderer`` there). ``wrapper`` The :term:`view name` (*not* an object dotted name) of another view declared elsewhere in ZCML (or via the ``@view_config`` decorator) which will receive the response body of this view as the ``request.wrapped_body`` attribute of its own request, and the response returned by this view as the ``request.wrapped_response`` attribute of its own request. This attribute has the same meaning as it would in the context of :ref:`view_directive`; see the description of ``wrapper`` there). Note that the wrapper view *should not* be protected by any permission; behavior is undefined if it does. Example ~~~~~~~ .. code-block:: xml :linenos: Alternatives ~~~~~~~~~~~~ Use the :ref:`view_directive` directive with a ``context`` that names the :exc:`pyramid.exceptions.Forbidden` class. Use the :meth:`pyramid.config.Configurator.add_view` method, passing it a ``context`` which is the :exc:`pyramid.exceptions.Forbidden` class. See Also ~~~~~~~~ See also :ref:`changing_the_forbidden_view`. pyramid_zcml-1.0.0/docs/zcml/remoteuserauthenticationpolicy.rst0000644000175000017500000000301211656047135025113 0ustar tseavertseaver.. _remoteuserauthenticationpolicy_directive: ``remoteuserauthenticationpolicy`` ---------------------------------- When this directive is used, authentication information is obtained from a ``REMOTE_USER`` key in the WSGI environment, assumed to be set by a WSGI server or an upstream middleware component. Attributes ~~~~~~~~~~ ``environ_key`` The ``environ_key`` is the name that will be used to obtain the remote user value from the WSGI environment. It defaults to ``REMOTE_USER``. ``callback`` The ``callback`` is a Python dotted name to a function passed the string representing the remote user and the request as positional arguments. The callback is expected to return None if the user represented by the string doesn't exist or a sequence of group identifiers (possibly empty) if the user does exist. If ``callback`` is None, the userid will be assumed to exist with no groups. It defaults to ``None``. Example ~~~~~~~ .. code-block:: xml :linenos: Alternatives ~~~~~~~~~~~~ You may create an instance of the :class:`pyramid.authentication.RemoteUserAuthenticationPolicy` and pass it to the :class:`pyramid.config.Configurator` constructor as the ``authentication_policy`` argument during initial application configuration. See Also ~~~~~~~~ See also :ref:`authentication_policies_directives_section` and :class:`pyramid.authentication.RemoteUserAuthenticationPolicy`. pyramid_zcml-1.0.0/docs/zcml/asset.rst0000644000175000017500000000245411656047135017671 0ustar tseavertseaver.. _asset_directive: ``asset`` --------- The ``asset`` directive adds an asset override for a single static file/directory asset. Attributes ~~~~~~~~~~ ``to_override`` A :term:`asset specification` specifying the asset to be overridden. ``override_with`` A :term:`asset specification` specifying the asset which is used as the override. Examples ~~~~~~~~ .. topic:: Overriding a Single Asset File .. code-block:: xml :linenos: .. topic:: Overriding all Assets in a Package .. code-block:: xml :linenos: .. topic:: Overriding all Assets in a Subdirectory of a Package .. code-block:: xml :linenos: Alternatives ~~~~~~~~~~~~ The :meth:`pyramid.config.Configurator.override_asset` method can be used instead of the ``resource`` ZCML directive. This directive can also be invoked as the ``resource`` ZCML directive for backwards compatibility purposes. See Also ~~~~~~~~ See also :ref:`asset_zcml_directive`. pyramid_zcml-1.0.0/docs/.gitignore0000644000175000017500000000002111736362264017031 0ustar tseavertseaver_build/ _themes/ pyramid_zcml-1.0.0/docs/api.rst0000644000175000017500000000043011656047135016346 0ustar tseavertseaver.. _pyramid_zcml_api: :mod:`pyramid_zcml` API ----------------------- .. automodule:: pyramid_zcml .. autofunction:: load_zcml(spec='configure.zcml') .. autofunction:: make_app(root_factory, package=None, filename='configure.zcml', settings=None) .. autofunction:: includeme pyramid_zcml-1.0.0/docs/Makefile0000644000175000017500000000521511736362264016513 0ustar tseavertseaver# Makefile for Sphinx documentation # # You can set these variables from the command line. SPHINXOPTS = -W SPHINXBUILD = sphinx-build PAPER = # Internal variables. PAPEROPT_a4 = -D latex_paper_size=a4 PAPEROPT_letter = -D latex_paper_size=letter ALLSPHINXOPTS = -d _build/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) . .PHONY: help clean html web pickle htmlhelp latex changes linkcheck help: @echo "Please use \`make ' where is one of" @echo " html to make standalone HTML files" @echo " pickle to make pickle files (usable by e.g. sphinx-web)" @echo " htmlhelp to make HTML files and a HTML help project" @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter" @echo " changes to make an overview over all changed/added/deprecated items" @echo " linkcheck to check all external links for integrity" clean: -rm -rf _build/* html: mkdir -p _build/html _build/doctrees $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) _build/html @echo @echo "Build finished. The HTML pages are in _build/html." text: mkdir -p _build/text _build/doctrees $(SPHINXBUILD) -b text $(ALLSPHINXOPTS) _build/text @echo @echo "Build finished. The HTML pages are in _build/text." pickle: mkdir -p _build/pickle _build/doctrees $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) _build/pickle @echo @echo "Build finished; now you can process the pickle files or run" @echo " sphinx-web _build/pickle" @echo "to start the sphinx-web server." web: pickle htmlhelp: mkdir -p _build/htmlhelp _build/doctrees $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) _build/htmlhelp @echo @echo "Build finished; now you can run HTML Help Workshop with the" \ ".hhp project file in _build/htmlhelp." latex: mkdir -p _build/latex _build/doctrees $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) _build/latex cp _static/*.png _build/latex ./convert_images.sh cp _static/latex-warning.png _build/latex cp _static/latex-note.png _build/latex @echo @echo "Build finished; the LaTeX files are in _build/latex." @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \ "run these through (pdf)latex." changes: mkdir -p _build/changes _build/doctrees $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) _build/changes @echo @echo "The overview file is in _build/changes." linkcheck: mkdir -p _build/linkcheck _build/doctrees $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) _build/linkcheck @echo @echo "Link check complete; look for any errors in the above output " \ "or in _build/linkcheck/output.txt." epub: $(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) _build/epub @echo @echo "Build finished. The epub file is in _build/epub." pyramid_zcml-1.0.0/docs/conf.py0000644000175000017500000001572211736362264016356 0ustar tseavertseaver# -*- coding: utf-8 -*- # # pyramid_zcml documentation build configuration file # # This file is execfile()d with the current directory set to its containing # dir. # # The contents of this file are pickled, so don't put values in the # namespace that aren't pickleable (module imports are okay, they're # removed automatically). # # All configuration values have a default value; values that are commented # out serve to show the default value. # If your extensions are in another directory, add it here. If the # directory is relative to the documentation root, use os.path.abspath to # make it absolute, like shown here. #sys.path.append(os.path.abspath('some/directory')) import sys, os # Add and use Pylons theme if 'sphinx-build' in ' '.join(sys.argv): # protect against dumb importers from subprocess import call, Popen, PIPE p = Popen('which git', shell=True, stdout=PIPE) git = p.stdout.read().strip() cwd = os.getcwd() _themes = os.path.join(cwd, '_themes') if not os.path.isdir(_themes): call([git, 'clone', 'git://github.com/Pylons/pylons_sphinx_theme.git', '_themes']) else: os.chdir(_themes) call([git, 'checkout', 'master']) call([git, 'pull']) os.chdir(cwd) sys.path.append(os.path.abspath('_themes')) parent = os.path.dirname(os.path.dirname(__file__)) sys.path.append(os.path.abspath(parent)) wd = os.getcwd() os.chdir(parent) os.system('%s setup.py test -q' % sys.executable) os.chdir(wd) for item in os.listdir(parent): if item.endswith('.egg'): sys.path.append(os.path.join(parent, item)) # General configuration # --------------------- # Add any Sphinx extension module names here, as strings. They can be # extensions coming with Sphinx (named 'sphinx.ext.*') or your custom ones. extensions = [ 'sphinx.ext.autodoc', 'sphinx.ext.intersphinx', ] # Looks for pyramid's objects intersphinx_mapping = { 'pyramid': ('http://docs.pylonsproject.org/projects/pyramid/dev/', None)} # Add any paths that contain templates here, relative to this directory. templates_path = ['.templates'] # The suffix of source filenames. source_suffix = '.rst' # The master toctree document. master_doc = 'index' # General substitutions. project = 'pyramid_zcml' copyright = '2011, Agendaless Consulting ' # The default replacements for |version| and |release|, also used in various # other places throughout the built documents. # # The short X.Y version. version = '0.9.2' # The full version, including alpha/beta/rc tags. release = version # There are two options for replacing |today|: either, you set today to # some non-false value, then it is used: #today = '' # Else, today_fmt is used as the format for a strftime call. today_fmt = '%B %d, %Y' # List of documents that shouldn't be included in the build. #unused_docs = [] # List of directories, relative to source directories, that shouldn't be # searched for source files. #exclude_dirs = [] exclude_patterns = ['_themes/README.rst',] # The reST default role (used for this markup: `text`) to use for all # documents. #default_role = None # If true, '()' will be appended to :func: etc. cross-reference text. #add_function_parentheses = True # If true, the current module name will be prepended to all description # unit titles (such as .. function::). #add_module_names = True # If true, sectionauthor and moduleauthor directives will be shown in the # output. They are ignored by default. #show_authors = False # The name of the Pygments (syntax highlighting) style to use. pygments_style = 'sphinx' # Options for HTML output # ----------------------- # Add and use Pylons theme sys.path.append(os.path.abspath('_themes')) html_theme_path = ['_themes'] html_theme = 'pyramid' html_theme_options = { 'github_url': 'https://github.com/Pylons/pyramid_zcml' } # The style sheet to use for HTML and HTML Help pages. A file of that name # must exist either in Sphinx' static/ path, or in one of the custom paths # given in html_static_path. # html_style = 'repoze.css' # The name for this set of Sphinx documents. If None, it defaults to # " v documentation". #html_title = None # A shorter title for the navigation bar. Default is the same as # html_title. #html_short_title = None # The name of an image file (within the static path) to place at the top of # the sidebar. # html_logo = '.static/logo_hi.gif' # The name of an image file (within the static path) to use as favicon of # the docs. This file should be a Windows icon file (.ico) being 16x16 or # 32x32 pixels large. #html_favicon = None # Add any paths that contain custom static files (such as style sheets) # here, relative to this directory. They are copied after the builtin # static files, so a file named "default.css" will overwrite the builtin # "default.css". html_static_path = ['.static'] # If not '', a 'Last updated on:' timestamp is inserted at every page # bottom, using the given strftime format. html_last_updated_fmt = '%b %d, %Y' # If true, SmartyPants will be used to convert quotes and dashes to # typographically correct entities. #html_use_smartypants = True # Custom sidebar templates, maps document names to template names. #html_sidebars = {} # Additional templates that should be rendered to pages, maps page names to # template names. #html_additional_pages = {} # If false, no module index is generated. #html_use_modindex = True # If false, no index is generated. #html_use_index = True # If true, the index is split into individual pages for each letter. #html_split_index = False # If true, the reST sources are included in the HTML build as # _sources/. #html_copy_source = True # If true, an OpenSearch description file will be output, and all pages # will contain a tag referring to it. The value of this option must # be the base URL from which the finished HTML is served. #html_use_opensearch = '' # If nonempty, this is the file name suffix for HTML files (e.g. ".xhtml"). #html_file_suffix = '' # Output file base name for HTML help builder. htmlhelp_basename = 'atemplatedoc' # Options for LaTeX output # ------------------------ # The paper size ('letter' or 'a4'). #latex_paper_size = 'letter' # The font size ('10pt', '11pt' or '12pt'). #latex_font_size = '10pt' # Grouping the document tree into LaTeX files. List of tuples # (source start file, target name, title, # author, document class [howto/manual]). latex_documents = [ ('index', 'pyramid_zcml.tex', 'pyramid_zcml Documentation', 'Repoze Developers', 'manual'), ] # The name of an image file (relative to this directory) to place at the # top of the title page. latex_logo = '.static/logo_hi.gif' # For "manual" documents, if this is true, then toplevel headings are # parts, not chapters. #latex_use_parts = False # Additional stuff for the LaTeX preamble. #latex_preamble = '' # Documents to append as an appendix to all manuals. #latex_appendices = [] # If false, no module index is generated. #latex_use_modindex = True pyramid_zcml-1.0.0/docs/zcml.rst0000644000175000017500000000130111656047135016540 0ustar tseavertseaver.. _zcml_directives: ZCML Directives =============== Comprehensive reference material for every ZCML directive provided by Pyramid is available within this chapter. The ZCML directive documentation is organized alphabetically by directive name. .. toctree:: :maxdepth: 1 zcml/aclauthorizationpolicy zcml/adapter zcml/authtktauthenticationpolicy zcml/asset zcml/configure zcml/default_permission zcml/forbidden zcml/include zcml/localenegotiator zcml/notfound zcml/remoteuserauthenticationpolicy zcml/renderer zcml/repozewho1authenticationpolicy zcml/route zcml/scan zcml/static zcml/subscriber zcml/translationdir zcml/utility zcml/view pyramid_zcml-1.0.0/docs/index.rst0000644000175000017500000000336111736362264016714 0ustar tseavertseaverpyramid_zcml ============ Overview -------- ``pyramid_zcml`` is a package which provides :term:`ZCML` directives for all built-in Pyramid configurator methods. Installation ------------ Install using setuptools, e.g. (within a virtualenv):: $ easy_install pyramid_zcml Setup ----- Once ``pyramid_zcml`` is installed, you must use the ``config.include`` mechanism to include it into your Pyramid project's configuration. In your Pyramid project's ``__init__.py``: .. code-block:: python :linenos: import pyramid_zcml config = Configurator(.....) config.include(pyramid_zcml) Do this before trying to load any ZCML. After this step is taken, it will be possible to use the :func:`pyramid_zcml.load_zcml` function as a method of the configurator, ala: .. code-block:: python :linenos: config.load_zcml(....) Paster Template --------------- The ``pyramid_starter_zcml`` Paster template is included with this package. You can use it via ``paster create -t pyramid_starter_zcml`` (on Pyramid 1.0, 1.1, or 1.2) or ``pcreate -s pyramid_starter_zcml`` (on Pyramid 1.3). It creates a package skeleton which configures a Pyramid appliction via ZCML. The application performs URL mapping via :term:`traversal` and no persistence mechanism. Usage ----- .. toctree:: :maxdepth: 2 narr.rst Directives and API ------------------ .. toctree:: :maxdepth: 2 zcml.rst api.rst glossary.rst Reporting Bugs / Development Versions ------------------------------------- Visit http://github.com/Pylons/pyramid_zcml to download development or tagged versions. Visit http://github.com/Pylons/pyramid_zcml/issues to report bugs. Indices and tables ------------------ * :ref:`glossary` * :ref:`genindex` * :ref:`modindex` * :ref:`search` pyramid_zcml-1.0.0/docs/.static/0000775000175000017500000000000012113677651016416 5ustar tseavertseaverpyramid_zcml-1.0.0/docs/.static/repoze.css0000644000175000017500000000057211656047135020435 0ustar tseavertseaver@import url('default.css'); body { background-color: #006339; } div.document { background-color: #dad3bd; } div.sphinxsidebar h3, h4, h5, a { color: #127c56 !important; } div.related { color: #dad3bd !important; background-color: #00744a; } div.related a { color: #dad3bd !important; } div.body p, div.body dd, div.body li { text-align: left; } pyramid_zcml-1.0.0/docs/.static/logo_hi.gif0000644000175000017500000000752411656047135020532 0ustar tseavertseaverGIF89až3÷¡¡ BBBÈÁ®––•ðîåêæÙ‹‹‹†ƒzÔÎ¹ÆÆÆ<<>>ÚÔ¾÷öòÛÔ¾þþýÛÕ¿ØÑ»àÚÇÛÔ¿–’†Þ×ÄÜÖÁ–’…÷öñäßÏLKIûú÷çâÔ¶¶¶íêßÝ×ÃëçÜľ«æâÓBBAçãÔÆÀ­@@?ëèÜôòëýýüúùõúùöÁ»©|||??>–“‡AAA½¹©‘‘‘ØÒÃÚÕÆËȼñðìEEEHGE•‘…ÄÄÃêèáÒÒÎÜÜÚ·¶³ããâcccØ×ÕµµµËųMMM©§ åàÔÐ˽Ô͸Ð̾óóóvur@??›—ŠÔÓÒÕÕÑöõòÆÁ³YYY„xCCCš—þ¯¹¸µihc:::ÚÓ½!ù,ž3ÿÿ H° Áƒ*\Ȱ¡Ã‡#JœH±¢Å‹3jÜȱ£Ç†‰òˆIr’›CØìùȲ¥Ë…¡.ÈœI³æ˜^êÜù‘FÍŸ?ѬàI´hEŸ*„XÊM âJu!Ò ²j%D. Mjâ©J¶ì?¤_žÉÐÅ–­Œ@D|Íù†"Ý…t’˜Ý[©'Y ÙEHG8Ë.¾ˆ_¦’ù7CW"7)¸òÇTv'Èr¼ÐÖ¦+R¢€cØNÀ+'n cÌØ ‹ZŒMédË#„…±g׎ˆ9fÎ _H‘rA\„F†ä©SAUR`rMqˆ`E"æWÒ¥‚”&Ä7Ä„ÿB5BU¶ t f“ûM?~ÀO?¾˜5¯¾ÁWGÕ‚|¨¤Òí<”Jv¿5„ÏpÅaÐ)ЀʄRx F,DE¦thÊ.°ÀOtÂ%`˜`B>,¶È¢C4D54ÖXc8¾’ã+ÀpA–¬ñ ,° 9$‘°Ð ‡C-€– Cy  ÔÅ&Ž E(ŒqÁ¦Œ0ÂÖ tÃ$ ЍæÜ´Ùf(DÍ.º@>äyÍXM4â¸ã+„úÅÅä 7H‚JhT À¤“ºÁçBE ÷¤BZ´0œ'È@Ðã‰YN1¼“Ã6tðQއÿb”ˆÈÍžPÈ X£Ä*š°€:aàb l€ßìT£Ã¥uQØf«í jJ dÌBÐDNªC tP<P ¥_P‹P¦RlšúpÊ´ æ;¸ðŒDì2‹$$a€‡Q°CÐk¸‰Â7´È2‡/Dx0ƒœ°(¬¬•’g& J#ã†ÌA:‚r ADÌ!ÄÍ8ã(aŒð 8ž‚€T4΃é»@¯ä ›3(Üh.Ð@†þBÑæ°½ƒT@L;|BÙ¡é s¹C›¤@ŽØ¤khQ:ÎQÄ™ýCt €0`à=GJX…-êW|A‹ !,@àÄ3“zr€»¯ÕasA€ƒà rnàqâ€ÃåRí¡h2[ŠK\ Djâ†Þئ<à9E*Z8ÿp@žò!p.„„òn€ Bí€ ù¥°ºƒxã|‹ … ¢ÿóÕ“ðètÀãSÈ%Œ™ƒ=Èa,$`÷h“ ¸¡‚ôá€%è£@äA'6縪ôx”BŒ †ËÿÐ)ðÈ 6•x¬‚;50b–L¿«áï…œPÈxF¤+àØÃ´Ð90b“òA•00)4l#QCÅ€-Dã&—¡él…¦pƒà}PÑGÜÖ¿¡v ‚GÈãï€÷»<Ú ³'‚ c¸C´Ð·«!u!,.¨_Ðh ZNÈÏ_a¦ $ @ÒŽ+P2ð”R(àÕ‡ú‰MœosÜPÅ/`qg.bª ¶¯§¡Ed‚×_ D 2,%óúø¼vƒvm!^+à—P„/y­z"„ù“<ð‘»ÈS ?y”Hù“€ÇWš”P•R•å C4©º; ´@«ð•`–b9–¾°‚-@_·0–j¹–j™š`!` \8ly—x™—w© ƒW¹H0 ø`°cäPˆa«Qà 0ªÈ$À žW}…GJ ‰±l í¸Æ ð ñà að CÐpq–Q–@PA …ñd¼vˆyGP p¯YÊP¯à ù E"À ž( ‘Pã {„¦ ü œ0Ì@Ìó›ˆÀ@ 1à áF¾@d ½s Ç@ À90Ç0è) ŽÐ ‘èüÙŸþùŸ ;pyramid_zcml-1.0.0/docs/glossary.rst0000644000175000017500000003532611656047135017454 0ustar tseavertseaver.. _glossary: Glossary ======== .. glossary:: :sorted: Pyramid A `web framework `_. View handler A view handler ties together :meth:`pyramid.config.Configurator.add_route` and :meth:`pyramid.config.Configurator.add_view` to make it more convenient to register a collection of views as a single class when using :term:`url dispatch`. See also :ref:`views_chapter`. Pylons `A lightweight Python web framework `_. URL dispatch An alternative to :term:`traversal` as a mechanism for locating a a :term:`view callable`. When you use a :term:`route` in your Pyramid application via a :term:`route configuration`, you are using URL dispatch. See the :ref:`urldispatch_chapter` for more information. ZCML `Zope Configuration Markup Language `_, an XML dialect used by Zope and Pyramid for configuration tasks. ZCML is capable of performing different types of :term:`configuration declaration`, but its primary purpose in Pyramid is to perform :term:`view configuration` and :term:`route configuration` within the ``configure.zcml`` file in a Pyramid application. You can use ZCML as an alternative to :term:`imperative configuration`. asset specification A colon-delimited identifier for an :term:`asset`. The colon separates a Python :term:`package` name from a package subpath. For example, the asset specification ``my.package:static/baz.css`` identifies the file named ``baz.css`` in the ``static`` subdirectory of the ``my.package`` Python :term:`package`. See :ref:`asset_specifications` for more info. view callable A "view callable" is a callable Python object which is associated with a :term:`view configuration`; it returns a :term:`response` object . A view callable accepts a single argument: ``request``, which will be an instance of a :term:`request` object. A view callable is the primary mechanism by which a developer writes user interface code within Pyramid. See :ref:`views_chapter` for more information about Pyramid view callables. view Common vernacular for a :term:`view callable`. view predicate An argument to a :term:`view configuration` which evaluates to ``True`` or ``False`` for a given :term:`request`. All predicates attached to a view configuration must evaluate to true for the associated view to be considered as a possible callable for a given request. traversal The act of descending "up" a tree of resource objects from a root resource in order to find a context resource. The Pyramid :term:`router` performs traversal of resource objects when a :term:`root factory` is specified. See the :ref:`traversal_chapter` chapter for more information. Traversal can be performed *instead* of :term:`URL dispatch` or can be combined *with* URL dispatch. See :ref:`hybrid_chapter` for more information about combining traversal and URL dispatch (advanced). imperative configuration The configuration mode in which you use Python to call methods on a :term:`Configurator` in order to add each :term:`configuration declaration` required by your application. route configuration Route configuration is the act of using :term:`imperative configuration` or a :term:`ZCML` ```` statement to associate request parameters with a particular :term:`route` using pattern matching and :term:`route predicate` statements. See :ref:`urldispatch_chapter` for more information about route configuration. view configuration View configuration is the act of associating a :term:`view callable` with configuration information. This configuration information helps map a given :term:`request` to a particular view callable and it can influence the response of a view callable. Pyramid views can be configured via :term:`imperative configuration`, :term:`ZCML` or by a special ``@view_config`` decorator coupled with a :term:`scan`. See :ref:`view_config_chapter` for more information about view configuration. configuration declaration An individual method call made to an instance of a Pyramid :term:`Configurator` object which performs an arbitrary action, such as registering a :term:`view configuration` (via the ``add_view`` method of the configurator) or :term:`route configuration` (via the ``add_route`` method of the configurator). request A ``WebOb`` request object. See :ref:`webob_chapter` (narrative) and :ref:`request_module` (API documentation) for information about request objects. scan The term used by Pyramid to define the process of importing and examining all code in a Python package or module for :term:`configuration decoration`. route A single pattern matched by the :term:`url dispatch` subsystem, which generally resolves to one or more :term:`view callable` objects. See also :term:`url dispatch`. asset Any file contained within a Python :term:`package` which is *not* a Python source code file. asset specification A colon-delimited identifier for an :term:`asset`. The colon separates a Python :term:`package` name from a package subpath. For example, the asset specification ``my.package:static/baz.css`` identifies the file named ``baz.css`` in the ``static`` subdirectory of the ``my.package`` Python :term:`package`. See :ref:`asset_specifications` for more info. package A directory on disk which contains an ``__init__.py`` file, making it recognizable to Python as a location which can be ``import`` -ed. A package exists to contain :term:`module` files. module A Python source file; a file on the filesystem that typically ends with the extension ``.py`` or ``.pyc``. Modules often live in a :term:`package`. configurator An object used to do :term:`configuration declaration` within an application. The most common configurator is an instance of the ``pyramid.config.Configurator`` class. route predicate An argument to a :term:`route configuration` which implies a value that evaluates to ``True`` or ``False`` for a given :term:`request`. All predicates attached to a :term:`route configuration` must evaluate to ``True`` for the associated route to "match" the current request. If a route does not match the current request, the next route (in definition order) is attempted. root factory The "root factory" of an Pyramid application is called on every request sent to the application. The root factory returns the traversal root of an application. It is conventionally named ``get_root``. An application may supply a root factory to Pyramid during the construction of a :term:`Configurator`. If a root factory is not supplied, the application uses a default root object. Use of the default root object is useful in application which use :term:`URL dispatch` for all URL-to-view code mappings. configuration decoration Metadata implying one or more :term:`configuration declaration` invocations. Often set by configuration Python :term:`decorator` attributes, such as :class:`pyramid.view.view_config`, aka ``@view_config``. decorator A wrapper around a Python function or class which accepts the function or class as its first argument and which returns an arbitrary object. Pyramid provides several decorators, used for configuration and return value modification purposes. See also `PEP 318 `_. router The :term:`WSGI` application created when you start a Pyramid application. The router intercepts requests, invokes traversal and/or URL dispatch, calls view functions, and returns responses to the WSGI server on behalf of your Pyramid application. WSGI `Web Server Gateway Interface `_. This is a Python standard for connecting web applications to web servers, similar to the concept of Java Servlets. Pyramid requires that your application be served as a WSGI application. dotted Python name A reference to a Python object by name using a string, in the form ``path.to.modulename:attributename``. Often used in Paste and setuptools configurations. A variant is used in dotted names within :term:`ZCML` attributes that name objects (such as the ZCML "view" directive's "view" attribute): the colon (``:``) is not used; in its place is a dot. application registry A registry of configuration information consulted by Pyramid while servicing an application. An application registry maps resource types to views, as well as housing other application-specific component registrations. Every Pyramid application has one (and only one) application registry. view name The "URL name" of a view, e.g ``index.html``. If a view is configured without a name, its name is considered to be the empty string (which implies the :term:`default view`). Default view The default view of a :term:`resource` is the view invoked when the :term:`view name` is the empty string (``''``). This is the case when :term:`traversal` exhausts the path elements in the PATH_INFO of a request before it returns a :term:`context` resource. Zope Component Architecture The `Zope Component Architecture `_ (aka ZCA) is a system which allows for application pluggability and complex dispatching based on objects which implement an :term:`interface`. Pyramid uses the ZCA "under the hood" to perform view dispatching and other application configuration tasks. Translation Directory A translation directory is a :term:`gettext` translation directory. It contains language folders, which themselves contain ``LC_MESSAGES`` folders, which contain ``.mo`` files. Each ``.mo`` file represents a set of translations for a language in a :term:`translation domain`. The name of the ``.mo`` file (minus the .mo extension) is the translation domain name. Translation Domain A string representing the "context" in which a translation was made. For example the word "java" might be translated differently if the translation domain is "programming-languages" than would be if the translation domain was "coffee". A translation domain is represnted by a collection of ``.mo`` files within one or more :term:`translation directory` directories. view mapper A view mapper is a class which implements the :class:`pyramid.interfaces.IViewMapperFactory` interface, which performs view argument and return value mapping. This is a plug point for extension builders, not normally used by "civilians". authorization policy An authorization policy in Pyramid terms is a bit of code which has an API which determines whether or not the principals associated with the request can perform an action associated with a permission, based on the information found on the :term:`context` resource. Locale Negotiator An object supplying a policy determining which :term:`locale name` best represents a given :term:`request`. It is used by the :func:`pyramid.i18n.get_locale_name`, and :func:`pyramid.i18n.negotiate_locale_name` functions, and indirectly by :func:`pyramid.i18n.get_localizer`. The :func:`pyramid.i18n.default_locale_negotiator` function is an example of a locale negotiator. Locale Name A string like ``en``, ``en_US``, ``de``, or ``de_AT`` which uniquely identifies a particular locale. Default Locale Name The :term:`locale name` used by an application when no explicit locale name is set. See :ref:`localization_deployment_settings`. Forbidden view An :term:`exception view` invoked by Pyramid when the developer explicitly raises a ``pyramid.exceptions.Forbidden`` exception from within :term:`view` code or :term:`root factory` code, or when the :term:`view configuration` and :term:`authorization policy` found for a request disallows a particular view invocation. Pyramid provides a default implementation of a forbidden view; it can be overridden. See :ref:`changing_the_forbidden_view`. Exception view An exception view is a :term:`view callable` which may be invoked by Pyramid when an exception is raised during request processing. See :ref:`exception_views` for more information. Not Found view An :term:`exception view` invoked by Pyramid when the developer explicitly raises a ``pyramid.exceptions.NotFound`` exception from within :term:`view` code or :term:`root factory` code, or when the current request doesn't match any :term:`view configuration`. Pyramid provides a default implementation of a not found view; it can be overridden. See :ref:`changing_the_notfound_view`. default permission A :term:`permission` which is registered as the default for an entire application. When a default permission is in effect, every :term:`view configuration` registered with the system will be effectively amended with a ``permission`` argument that will require that the executing user possess the default permission in order to successfully execute the associated :term:`view callable` See also :ref:`setting_a_default_permission`. renderer A serializer that can be referred to via :term:`view configuration` which converts a non-:term:`Response` return values from a :term:`view` into a string (and ultimately a response). Using a renderer can make writing views that require templating or other serialization less tedious. See :ref:`views_which_use_a_renderer` for more information. renderer factory A factory which creates a :term:`renderer`. See :ref:`adding_and_overriding_renderers` for more information. authentication policy An authentication policy in Pyramid terms is a bit of code which has an API which determines the current :term:`principal` (or principals) associated with a request. ZCML declaration The concrete use of a :term:`ZCML directive` within a ZCML file. ZCML directive A ZCML "tag" such as ```` or ````. Resource Location The act of locating a :term:`context` resource given a :term:`request`. :term:`Traversal` and :term:`URL dispatch` are the resource location subsystems used by Pyramid. pyramid_zcml-1.0.0/docs/narr.rst0000644000175000017500000013117411736362264016553 0ustar tseavertseaver.. _declarative_chapter: Declarative Configuration using ZCML ==================================== The mode of configuration detailed in the examples within the :term:`Pyramid` documentation is "imperative" configuration. This is the configuration mode in which a developer cedes the least amount of control to the framework; it's "imperative" because you express the configuration directly in Python code, and you have the full power of Python at your disposal as you issue configuration statements. However, another mode of configuration exists For Pyramid within ``pyramid_zcml`` named :term:`ZCML` which is *declarative*. In ZCML, configuration statements are made via an domain specific language implemented in XML. There is no opportunity for conditionals or loops. Declarative languages are less powerful than their imperative counterparts; this is attractive in environments where consistency is more important than brevity. A complete listing of ZCML directives is available within :ref:`zcml_directives`. This chapter provides an overview of how you might get started with ZCML and highlights some common tasks performed when you use ZCML. .. index:: single: declarative configuration .. _declarative_configuration: ZCML Configuration ------------------ A Pyramid application can be configured "declaratively", if so desired. Declarative configuration relies on *declarations* made external to the code in a configuration file format named :term:`ZCML` (Zope Configuration Markup Language), an XML dialect. A Pyramid application configured declaratively requires not one, but two files: a Python file and a :term:`ZCML` file. In a file named ``helloworld.py``: .. code-block:: python :linenos: from paste.httpserver import serve from pyramid.response import Response from pyramid.config import Configurator def hello_world(request): return Response('Hello world!') if __name__ == '__main__': config = Configurator() config.include('pyramid_zcml') config.load_zcml('configure.zcml') app = config.make_wsgi_app() serve(app, host='0.0.0.0') In a file named ``configure.zcml`` in the same directory as the previously created ``helloworld.py``: .. code-block:: xml :linenos: This pair of files forms an application functionally equivalent to the application we created earlier in :ref:`imperative_configuration`. Let's examine the differences between that code listing and the code above. In :ref:`imperative_configuration`, we had the following lines within the ``if __name__ == '__main__'`` section of ``helloworld.py``: .. code-block:: python :linenos: if __name__ == '__main__': config = Configurator() config.add_view(hello_world) app = config.make_wsgi_app() serve(app, host='0.0.0.0') In our "declarative" code, we've removed the call to ``add_view`` and replaced it with a call to the :func:`pyramid_zcml.load_zcml` method so that it now reads as: .. code-block:: python :linenos: if __name__ == '__main__': config = Configurator() config.include('pyramid_zcml') config.load_zcml('configure.zcml') app = config.make_wsgi_app() serve(app, host='0.0.0.0') Everything else is much the same. The ``config.include('pyramid_zcml')`` line makes the ``load_zcml`` method available on the configurator. The ``config.load_zcml('configure.zcml')`` line tells the configurator to load configuration declarations from the file named ``configure.zcml`` which sits next to ``helloworld.py`` on the filesystem. Let's take a look at that ``configure.zcml`` file again: .. code-block:: xml :linenos: Note that this file contains some XML, and that the XML contains a ```` :term:`configuration declaration` tag that references a :term:`dotted Python name`. This dotted name refers to the ``hello_world`` function that lives in our ``helloworld`` Python module. This ```` declaration tag performs the same function as the ``add_view`` method that was employed within :ref:`imperative_configuration`. In fact, the ```` tag is effectively a "macro" which calls the :meth:`pyramid.config.Configurator.add_view` method on your behalf. The ```` tag is an example of a Pyramid declaration tag. Other such tags include ```` and ````. Each of these tags is effectively a "macro" which calls methods of a :class:`pyramid.config.Configurator` object on your behalf. Essentially, using a :term:`ZCML` file and loading it from the filesystem allows us to put our configuration statements within this XML file rather as declarations, rather than representing them as method calls to a :term:`Configurator` object. Otherwise, declarative and imperative configuration are functionally equivalent. Using declarative configuration has a number of benefits, the primary benefit being that applications configured declaratively can be *overridden* and *extended* by third parties without requiring the third party to change application code. If you want to build a framework or an extensible application, using declarative configuration is a good idea. Declarative configuration has an obvious downside: you can't use plain-old-Python syntax you probably already know and understand to configure your application; instead you need to use :term:`ZCML`. .. index:: single: ZCML conflict detection .. _zcml_conflict_detection: ZCML Conflict Detection ~~~~~~~~~~~~~~~~~~~~~~~ A minor additional feature of ZCML is *conflict detection*. If you define two declaration tags within the same ZCML file which logically "collide", an exception will be raised, and the application will not start. For example, the following ZCML file has two conflicting ```` tags: .. code-block:: xml :linenos: If you try to use this ZCML file as the source of ZCML for an application, an error will be raised when you attempt to start the application. This error will contain information about which tags might have conflicted. .. index:: single: helloworld (declarative) .. _helloworld_declarative: Hello World, Goodbye World (Declarative) ---------------------------------------- Another almost entirely equivalent mode of application configuration exists named *declarative* configuration. Pyramid can be configured for the same "hello world" application "declaratively", if so desired. To do so, first, create a file named ``helloworld.py``: .. code-block:: python :linenos: from pyramid.config import Configurator from pyramid.response import Response from paste.httpserver import serve def hello_world(request): return Response('Hello world!') def goodbye_world(request): return Response('Goodbye world!') if __name__ == '__main__': config = Configurator() config.include('pyramid_zcml') config.load_zcml('configure.zcml') app = config.make_wsgi_app() serve(app, host='0.0.0.0') Then create a file named ``configure.zcml`` in the same directory as the previously created ``helloworld.py``: .. code-block:: xml :linenos: This pair of files forms an application functionally equivalent to the application we created earlier in :ref:`helloworld_imperative`. We can run it the same way. .. code-block:: text $ python helloworld.py serving on 0.0.0.0:8080 view at http://127.0.0.1:8080 Let's examine the differences between the code in that section and the code above. In :ref:`helloworld_imperative_appconfig`, we had the following lines within the ``if __name__ == '__main__'`` section of ``helloworld.py``: .. code-block:: python :linenos: if __name__ == '__main__': config = Configurator() config.add_view(hello_world) config.add_view(goodbye_world, name='goodbye') app = config.make_wsgi_app() serve(app, host='0.0.0.0') In our "declarative" code, we've added a call to the :func:`pyramid_zcml.load_zcml` method with the value ``configure.zcml``, and we've removed the lines which read ``config.add_view(hello_world)`` and ``config.add_view(goodbye_world, name='goodbye')``, so that it now reads as: .. code-block:: python :linenos: if __name__ == '__main__': config = Configurator() config.include('pyramid_zcml') config.load_zcml('configure.zcml') app = config.make_wsgi_app() serve(app, host='0.0.0.0') Everything else is much the same. The ``config.load_zcml('configure.zcml')`` line tells the configurator to load configuration declarations from the ``configure.zcml`` file which sits next to ``helloworld.py``. Let's take a look at the ``configure.zcml`` file now: .. code-block:: xml :linenos: We already understand what the view code does, because the application is functionally equivalent to the application described in :ref:`helloworld_imperative`, but use of :term:`ZCML` is new. Let's break that down tag-by-tag. The ```` Tag ~~~~~~~~~~~~~~~~~~~~~~~ The ``configure.zcml`` ZCML file contains this bit of XML: .. code-block:: xml :linenos: Because :term:`ZCML` is XML, and because XML requires a single root tag for each document, every ZCML file used by Pyramid must contain a ``configure`` container directive, which acts as the root XML tag. It is a "container" directive because its only job is to contain other directives. See also :ref:`configure_directive` and :ref:`word_on_xml_namespaces`. .. _the_include_tag: The ```` Tag ~~~~~~~~~~~~~~~~~~~~~ The ``configure.zcml`` ZCML file contains this bit of XML within the ```` root tag: .. code-block:: xml :linenos: This self-closing tag instructs Pyramid to load a ZCML file from the Python package with the :term:`dotted Python name` ``pyramid_zcml``, as specified by its ``package`` attribute. This particular ```` declaration is required because it actually allows subsequent declaration tags (such as ````, which we'll see shortly) to be recognized. The ```` tag effectively just includes another ZCML file, causing its declarations to be executed. In this case, we want to load the declarations from the file named ``configure.zcml`` within the :mod:`pyramid_zcml` Python package. We know we want to load the ``configure.zcml`` from this package because ``configure.zcml`` is the default value for another attribute of the ```` tag named ``file``. We could have spelled the include tag more verbosely, but equivalently as: .. code-block:: xml :linenos: The ```` tag that includes the ZCML statements implied by the ``configure.zcml`` file from the Python package named :mod:`pyramid_zcml` is basically required to come before any other named declaration in an application's ``configure.zcml``. If it is not included, subsequent declaration tags will fail to be recognized, and the configuration system will generate an error at startup. However, the ```` tag needs to exist only in a "top-level" ZCML file, it needn't also exist in ZCML files *included by* a top-level ZCML file. See also :ref:`include_directive`. The ```` Tag ~~~~~~~~~~~~~~~~~~ The ``configure.zcml`` ZCML file contains these bits of XML *after* the ```` tag, but *within* the ```` root tag: .. code-block:: xml :linenos: These ```` declaration tags direct Pyramid to create two :term:`view configuration` registrations. The first ```` tag has an attribute (the attribute is also named ``view``), which points at a :term:`dotted Python name`, referencing the ``hello_world`` function defined within the ``helloworld`` package. The second ```` tag has a ``view`` attribute which points at a :term:`dotted Python name`, referencing the ``goodbye_world`` function defined within the ``helloworld`` package. The second ```` tag also has an attribute called ``name`` with a value of ``goodbye``. These effect of the ```` tag declarations we've put into our ``configure.zcml`` is functionally equivalent to the effect of lines we've already seen in an imperatively-configured application. We're just spelling things differently, using XML instead of Python. In our previously defined application, in which we added view configurations imperatively, we saw this code: .. ignore-next-block .. code-block:: python :linenos: config.add_view(hello_world) config.add_view(goodbye_world, name='goodbye') Each ```` declaration tag encountered in a ZCML file effectively invokes the :meth:`pyramid.config.Configurator.add_view` method on the behalf of the developer. Various attributes can be specified on the ```` tag which influence the :term:`view configuration` it creates. Since the relative ordering of calls to :meth:`pyramid.config.Configurator.add_view` doesn't matter (see the sidebar entitled *View Dispatch and Ordering* within :ref:`adding_configuration`), the relative order of ```` tags in ZCML doesn't matter either. The following ZCML orderings are completely equivalent: .. topic:: Hello Before Goodbye .. code-block:: xml :linenos: .. topic:: Goodbye Before Hello .. code-block:: xml :linenos: We've now configured a Pyramid helloworld application declaratively. More information about this mode of configuration is available in :ref:`declarative_configuration`. .. index:: single: ZCML granularity ZCML Granularity ~~~~~~~~~~~~~~~~ It's extremely helpful to third party application "extenders" (aka "integrators") if the :term:`ZCML` that composes the configuration for an application is broken up into separate files which do very specific things. These more specific ZCML files can be reintegrated within the application's main ``configure.zcml`` via ```` declarations. When ZCML files contain sets of specific declarations, an integrator can avoid including any ZCML he does not want by including only ZCML files which contain the declarations he needs. He is not forced to "accept everything" or "use nothing". For example, it's often useful to put all ```` declarations in a separate ZCML file, as ```` statements have a relative ordering that is extremely important to the application: if an extender wants to add a route to the "middle" of the routing table, he will always need to disuse all the routes and cut and paste the routing configuration into his own application. It's useful for the extender to be able to disuse just a *single* ZCML file in this case, accepting the remainder of the configuration from other :term:`ZCML` files in the original application. Granularizing ZCML is not strictly required. An extender can always disuse *all* your ZCML, choosing instead to copy and paste it into his own package, if necessary. However, doing so is considerate, and allows for the best reusability. Sometimes it's possible to include only certain ZCML files from an application that contain only the registrations you really need, omitting others. But sometimes it's not. For brute force purposes, when you're getting ``view`` or ``route`` registrations that you don't actually want in your overridden application, it's always appropriate to just *not include* any ZCML file from the overridden application. Instead, just cut and paste the entire contents of the ``configure.zcml`` (and any ZCML file included by the overridden application's ``configure.zcml``) into your own package and omit the ```` ZCML declaration in the overriding package's ``configure.zcml``. .. _zcml_scanning: Scanning via ZCML ----------------- :term:`ZCML` can invoke a :term:`scan` via its ```` directive. If a ZCML file is processed that contains a scan directive, the package the ZCML file points to is scanned. .. code-block:: python :linenos: # helloworld.py from paste.httpserver import serve from pyramid.response import Response from pyramid.view import view_config @view_config() def hello(request): return Response('Hello') if __name__ == '__main__': from pyramid.config import Configurator config = Configurator() config.include('pyramid_zcml') config.load_zcml('configure.zcml') app = config.make_wsgi_app() serve(app, host='0.0.0.0') .. code-block:: xml :linenos: See also :ref:`scan_directive`. Which Mode Should I Use? ------------------------ A combination of imperative configuration, declarative configuration via ZCML and scanning can be used to configure any application. They are not mutually exclusive. Declarative configuraton was the more traditional form of configuration used in Pyramid applications; the first releases of Pyramid and all releases of Pyramid's predecessor named repoze.bfg included ZCML in the core. However, by virtue of this package, it has been externalized from the Pyramid core because it has proven that imperative mode configuration can be simpler to understand and document. However, you can choose to use imperative configuration, or declarative configuration via ZCML. Use the mode that best fits your brain as necessary. .. index:: single: ZCML view configuration .. _mapping_views_using_zcml_section: View Configuration Via ZCML ~~~~~~~~~~~~~~~~~~~~~~~~~~~ You may associate a view with a URL by adding :ref:`view_directive` declarations via :term:`ZCML` in a ``configure.zcml`` file. An example of a view declaration in ZCML is as follows: .. code-block:: xml :linenos: The above maps the ``.views.hello_world`` view callable function to the following set of :term:`resource location` results: - A :term:`context` object which is an instance (or subclass) of the Python class represented by ``.resources.Hello`` - A :term:`view name` equalling ``hello.html``. .. note:: Values prefixed with a period (``.``) for the ``context`` and ``view`` attributes of a ``view`` declaration (such as those above) mean "relative to the Python package directory in which this :term:`ZCML` file is stored". So if the above ``view`` declaration was made inside a ``configure.zcml`` file that lived in the ``hello`` package, you could replace the relative ``.resources.Hello`` with the absolute ``hello.resources.Hello``; likewise you could replace the relative ``.views.hello_world`` with the absolute ``hello.views.hello_world``. Either the relative or absolute form is functionally equivalent. It's often useful to use the relative form, in case your package's name changes. It's also shorter to type. You can also declare a *default view callable* for a :term:`resource` type: .. code-block:: xml :linenos: A *default view callable* simply has no ``name`` attribute. For the above registration, when a :term:`context` is found that is of the type ``.resources.Hello`` and there is no :term:`view name` associated with the result of :term:`resource location`, the *default view callable* will be used. In this case, it's the view at ``.views.hello_world``. A default view callable can alternately be defined by using the empty string as its ``name`` attribute: .. code-block:: xml :linenos: You may also declare that a view callable is good for any context type by using the special ``*`` character as the value of the ``context`` attribute: .. code-block:: xml :linenos: This indicates that when Pyramid identifies that the :term:`view name` is ``hello.html`` and the context is of any type, the ``.views.hello_world`` view callable will be invoked. A ZCML ``view`` declaration's ``view`` attribute can also name a class. In this case, the rules described in :ref:`class_as_view` apply for the class which is named. See :ref:`view_directive` for complete ZCML directive documentation. .. index:: single: ZCML directive; route .. _zcml_route_configuration: Configuring a Route via ZCML ---------------------------- Instead of using the imperative :meth:`pyramid.config.Configurator.add_route` method to add a new route, you can alternately use :term:`ZCML`. :ref:`route_directive` statements in a :term:`ZCML` file. For example, the following :term:`ZCML declaration` causes a route to be added to the application. .. code-block:: xml :linenos: .. note:: Values prefixed with a period (``.``) within the values of ZCML attributes such as the ``view`` attribute of a ``route`` mean "relative to the Python package directory in which this :term:`ZCML` file is stored". So if the above ``route`` declaration was made inside a ``configure.zcml`` file that lived in the ``hello`` package, you could replace the relative ``.views.myview`` with the absolute ``hello.views.myview`` Either the relative or absolute form is functionally equivalent. It's often useful to use the relative form, in case your package's name changes. It's also shorter to type. The order that routes are evaluated when declarative configuration is used is the order that they appear relative to each other in the ZCML file. See :ref:`route_directive` for full ``route`` ZCML directive documentation. .. index:: triple: view; zcml; static resource .. _zcml_static_assets_section: Serving Static Assets Using ZCML -------------------------------- Use of the ``static`` ZCML directive makes static assets available at a name relative to the application root URL, e.g. ``/static``. Note that the ``path`` provided to the ``static`` ZCML directive may be a fully qualified :term:`asset specification`, a package-relative path, or an *absolute path*. The ``path`` with the value ``a/b/c/static`` of a ``static`` directive in a ZCML file that resides in the "mypackage" package will resolve to a package-qualified assets such as ``some_package:a/b/c/static``. Here's an example of a ``static`` ZCML directive that will serve files up under the ``/static`` URL from the ``/var/www/static`` directory of the computer which runs the Pyramid application using an absolute path. .. code-block:: xml :linenos: Here's an example of a ``static`` directive that will serve files up under the ``/static`` URL from the ``a/b/c/static`` directory of the Python package named ``some_package`` using a fully qualified :term:`asset specification`. .. code-block:: xml :linenos: Here's an example of a ``static`` directive that will serve files up under the ``/static`` URL from the ``static`` directory of the Python package in which the ``configure.zcml`` file lives using a package-relative path. .. code-block:: xml :linenos: Whether you use for ``path`` a fully qualified asset specification, an absolute path, or a package-relative path, When you place your static files on the filesystem in the directory represented as the ``path`` of the directive, you will then be able to view the static files in this directory via a browser at URLs prefixed with the directive's ``name``. For instance if the ``static`` directive's ``name`` is ``static`` and the static directive's ``path`` is ``/path/to/static``, ``http://localhost:6543/static/foo.js`` will return the file ``/path/to/static/dir/foo.js``. The static directory may contain subdirectories recursively, and any subdirectories may hold files; these will be resolved by the static view as you would expect. While the ``path`` argument can be a number of different things, the ``name`` argument of the ``static`` ZCML directive can also be one of a number of things: a *view name* or a *URL*. The above examples have shown usage of the ``name`` argument as a view name. When ``name`` is a *URL* (or any string with a slash (``/``) in it), static assets can be served from an external webserver. In this mode, the ``name`` is used as the URL prefix when generating a URL using :func:`pyramid.url.static_url`. For example, the ``static`` ZCML directive may be fed a ``name`` argument which is ``http://example.com/images``: .. code-block:: xml :linenos: Because the ``static`` ZCML directive is provided with a ``name`` argument that is the URL prefix ``http://example.com/images``, subsequent calls to :func:`pyramid.url.static_url` with paths that start with the ``path`` argument passed to :meth:`pyramid.url.static_url` will generate a URL something like ``http://example.com/logo.png``. The external webserver listening on ``example.com`` must be itself configured to respond properly to such a request. The :func:`pyramid.url.static_url` API is discussed in more detail later in this chapter. The :meth:`pyramid.config.Configurator.add_static_view` method offers an imperative equivalent to the ``static`` ZCML directive. Use of the ``add_static_view`` imperative configuration method is completely equivalent to using ZCML for the same purpose. See :ref:`static_assets_section` for more information. .. index:: pair: ZCML directive; asset .. _asset_zcml_directive: The ``asset`` ZCML Directive ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Instead of using :meth:`pyramid.config.Configurator.override_asset` during :term:`imperative configuration`, an equivalent ZCML directive can be used. The ZCML ``asset`` tag is a frontend to using :meth:`pyramid.config.Configurator.override_asset`. An individual Pyramid ``asset`` ZCML statement can override a single asset. For example: .. code-block:: xml :linenos: The string value passed to both ``to_override`` and ``override_with`` attached to an ``asset`` directive is called an "asset specification". The colon separator in a specification separates the *package name* from the *asset name*. The colon and the following asset name are optional. If they are not specified, the override attempts to resolve every lookup into a package from the directory of another package. For example: .. code-block:: xml :linenos: Individual subdirectories within a package can also be overridden: .. code-block:: xml :linenos: If you wish to override an asset directory with another directory, you *must* make sure to attach the slash to the end of both the ``to_override`` specification and the ``override_with`` specification. If you fail to attach a slash to the end of an asset specification that points to a directory, you will get unexpected results. The package name in an asset specification may start with a dot, meaning that the package is relative to the package in which the ZCML file resides. For example: .. code-block:: xml :linenos: See also :ref:`asset_directive`. .. _zcml_authorization_policy: Enabling an Authorization Policy Via ZCML ----------------------------------------- If you'd rather use :term:`ZCML` to specify an authorization policy than imperative configuration, modify the ZCML file loaded by your application (usually named ``configure.zcml``) to enable an authorization policy. For example, to enable a policy which compares the value of an "auth ticket" cookie passed in the request's environment which contains a reference to a single :term:`principal` against the principals present in any :term:`ACL` found in the resource tree when attempting to call some :term:`view`, modify your ``configure.zcml`` to look something like this: .. code-block:: xml :linenos: "Under the hood", these statements cause an instance of the class :class:`pyramid.authentication.AuthTktAuthenticationPolicy` to be injected as the :term:`authentication policy` used by this application and an instance of the class :class:`pyramid.authorization.ACLAuthorizationPolicy` to be injected as the :term:`authorization policy` used by this application. Pyramid ships with a number of authorization and authentication policy ZCML directives that should prove useful. See :ref:`authentication_policies_directives_section` and :ref:`authorization_policies_directives_section` for more information. .. index:: pair: ZCML directive; authentication policy .. _authentication_policies_directives_section: Built-In Authentication Policy ZCML Directives ---------------------------------------------- Instead of configuring an authentication policy and authorization policy imperatively, Pyramid ships with a few "pre-chewed" authentication policy ZCML directives that you can make use of within your application. ``authtktauthenticationpolicy`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When this directive is used, authentication information is obtained from an "auth ticket" cookie value, assumed to be set by a custom login form. An example of its usage, with all attributes fully expanded: .. code-block:: xml :linenos: See :ref:`authtktauthenticationpolicy_directive` for details about this directive. ``remoteuserauthenticationpolicy`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When this directive is used, authentication information is obtained from a ``REMOTE_USER`` key in the WSGI environment, assumed to be set by a WSGI server or an upstream middleware component. An example of its usage, with all attributes fully expanded: .. code-block:: xml :linenos: See :ref:`remoteuserauthenticationpolicy_directive` for detailed information. ``repozewho1authenticationpolicy`` ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When this directive is used, authentication information is obtained from a ``repoze.who.identity`` key in the WSGI environment, assumed to be set by :term:`repoze.who` middleware. An example of its usage, with all attributes fully expanded: .. code-block:: xml :linenos: See :ref:`repozewho1authenticationpolicy_directive` for detailed information. .. index:: pair: ZCML directive; authorization policy .. _authorization_policies_directives_section: Built-In Authorization Policy ZCML Directives --------------------------------------------- ``aclauthorizationpolicy`` When this directive is used, authorization information is obtained from :term:`ACL` objects attached to resources. An example of its usage, with all attributes fully expanded: .. code-block:: xml :linenos: In other words, it has no configuration attributes; its existence in a ``configure.zcml`` file enables it. See :ref:`aclauthorizationpolicy_directive` for detailed information. .. _zcml_adding_and_overriding_renderers: Adding and Changing Renderers via ZCML -------------------------------------- New templating systems and serializers can be associated with Pyramid renderer names. To this end, configuration declarations can be made which change an existing :term:`renderer factory` and which add a new renderer factory. Adding or changing an existing renderer via ZCML is accomplished via the :ref:`renderer_directive` ZCML directive. For example, to add a renderer which renders views which have a ``renderer`` attribute that is a path that ends in ``.jinja2``: .. code-block:: xml :linenos: The ``factory`` attribute is a :term:`dotted Python name` that must point to an implementation of a :term:`renderer factory`. The ``name`` attribute is the renderer name. Registering a Renderer Factory ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ See :ref:`adding_a_renderer` for more information for the definition of a :term:`renderer factory`. Here's an example of the registration of a simple :term:`renderer factory` via ZCML: .. code-block:: xml :linenos: Adding the above ZCML to your application will allow you to use the ``my.package.MyAMFRenderer`` renderer factory implementation in view configurations by subseqently referring to it as ``amf`` in the ``renderer`` attribute of a :term:`view configuration`: .. code-block:: xml :linenos: Here's an example of the registration of a more complicated renderer factory, which expects to be passed a filesystem path: .. code-block:: xml :linenos: Adding the above ZCML to your application will allow you to use the ``my.package.MyJinja2Renderer`` renderer factory implementation in view configurations by referring to any ``renderer`` which *ends in* ``.jinja`` in the ``renderer`` attribute of a :term:`view configuration`: .. code-block:: xml :linenos: When a :term:`view configuration` which has a ``name`` attribute that does contain a dot, such as ``templates/mytemplate.jinja2`` above is encountered at startup time, the value of the name attribute is split on its final dot. The second element of the split is typically the filename extension. This extension is used to look up a renderer factory for the configured view. Then the value of ``renderer`` is passed to the factory to create a renderer for the view. In this case, the view configuration will create an instance of a ``Jinja2Renderer`` for each view configuration which includes anything ending with ``.jinja2`` as its ``renderer`` value. The ``name`` passed to the ``Jinja2Renderer`` constructor will be whatever the user passed as ``renderer=`` to the view configuration. See also :ref:`renderer_directive` and :meth:`pyramid.config.Configurator.add_renderer`. Changing an Existing Renderer ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ You can associate more than one filename extension with the same existing renderer implementation as necessary if you need to use a different file extension for the same kinds of templates. For example, to associate the ``.zpt`` extension with the Chameleon ZPT renderer factory, use: .. code-block:: xml :linenos: After you do this, Pyramid will treat templates ending in both the ``.pt`` and ``.zpt`` filename extensions as Chameleon ZPT templates. To change the default mapping in which files with a ``.pt`` extension are rendered via a Chameleon ZPT page template renderer, use a variation on the following in your application's ZCML: .. code-block:: xml :linenos: After you do this, the :term:`renderer factory` in ``my.package.pt_renderer`` will be used to render templates which end in ``.pt``, replacing the default Chameleon ZPT renderer. To ochange the default mapping in which files with a ``.txt`` extension are rendered via a Chameleon text template renderer, use a variation on the following in your application's ZCML: .. code-block:: xml :linenos: After you do this, the :term:`renderer factory` in ``my.package.text_renderer`` will be used to render templates which end in ``.txt``, replacing the default Chameleon text renderer. To associate a *default* renderer with *all* view configurations (even ones which do not possess a ``renderer`` attribute), use a variation on the following (ie. omit the ``name`` attribute to the renderer tag): .. code-block:: xml :linenos: See also :ref:`renderer_directive` and :meth:`pyramid.config.Configurator.add_renderer`. .. _zcml_adding_a_translation_directory: Adding a Translation Directory via ZCML --------------------------------------- You can add a translation directory via ZCML by using the :ref:`translationdir_directive` ZCML directive: .. code-block:: xml :linenos: A message catalog in a translation directory added via :ref:`translationdir_directive` will be merged into translations from a message catalog added earlier if both translation directories contain translations for the same locale and :term:`translation domain`. See also :ref:`translationdir_directive` and :ref:`adding_a_translation_directory`. .. _zcml_adding_a_locale_negotiator: Adding a Custom Locale Negotiator via ZCML ------------------------------------------ You can add a custom locale negotiator via ZCML by using the :ref:`localenegotiator_directive` ZCML directive: .. code-block:: xml :linenos: See also :ref:`custom_locale_negotiator` and :ref:`localenegotiator_directive`. .. index:: pair: subscriber; ZCML directive .. _zcml_event_listener: Configuring an Event Listener via ZCML -------------------------------------- You can configure an :term:`subscriber` by modifying your application's ``configure.zcml``. Here's an example of a bit of XML you can add to the ``configure.zcml`` file which registers the above ``mysubscriber`` function, which we assume lives in a ``subscribers.py`` module within your application: .. code-block:: xml :linenos: See also :ref:`subscriber_directive` and :ref:`events_chapter`. .. index:: single: not found view .. _notfound_zcml: Configuring a Not Found View via ZCML ------------------------------------- If your application uses :term:`ZCML`, you can replace the Not Found view by placing something like the following ZCML in your ``configure.zcml`` file. .. code-block:: xml :linenos: Replace ``helloworld.views.notfound_view`` with the Python dotted name to the notfound view you want to use. See :ref:`changing_the_notfound_view` for more information. .. index:: single: forbidden view .. _forbidden_zcml: Configuring a Forbidden View via ZCML ------------------------------------- If your application uses :term:`ZCML`, you can replace the Forbidden view by placing something like the following ZCML in your ``configure.zcml`` file. .. code-block:: xml :linenos: Replace ``helloworld.views.forbidden_view`` with the Python dotted name to the forbidden view you want to use. See :ref:`changing_the_forbidden_view` for more information. .. _changing_traverser_zcml: Configuring an Alternate Traverser via ZCML ------------------------------------------- Use an ``adapter`` stanza in your application's ``configure.zcml`` to change the default traverser: .. code-block:: xml :linenos: Or to register a traverser for a specific resource type: .. code-block:: xml :linenos: See :ref:`changing_the_traverser` for more information. .. index:: single: url generator .. _changing_resource_url_zcml: Changing ``resource_url`` URL Generation via ZCML ------------------------------------------------- You can change how :func:`pyramid.url.resource_url` generates a URL for a specific type of resource by adding an adapter statement to your ``configure.zcml``. .. code-block:: xml :linenos: See :ref:`changing_resource_url` for more information. .. _changing_request_factory_zcml: Changing the Request Factory via ZCML ------------------------------------- A ``MyRequest`` class can be registered via ZCML as a request factory through the use of the ZCML ``utility`` directive. In the below, we assume it lives in a package named ``mypackage.mymodule``. .. code-block:: xml :linenos: See :ref:`changing_the_request_factory` for more information. .. _adding_renderer_globals_zcml: Changing the Renderer Globals Factory via ZCML ---------------------------------------------- A renderer globals factory can be registered via ZCML as a through the use of the ZCML ``utility`` directive. In the below, we assume a ``renderers_globals_factory`` function lives in a package named ``mypackage.mymodule``. .. code-block:: xml :linenos: See :ref:`adding_renderer_globals` for more information. .. index:: single: Zope ZCML directives single: getGlobalSiteManager single: getSiteManager Using Broken ZCML Directives ---------------------------- Some :term:`Zope` and third-party :term:`ZCML` directives use the ``zope.component.getGlobalSiteManager`` API to get "the registry" when they should actually be calling ``zope.component.getSiteManager``. ``zope.component.getSiteManager`` can be overridden by Pyramid via :meth:`pyramid.config.Configurator.hook_zca`, while ``zope.component.getGlobalSiteManager`` cannot. Directives that use ``zope.component.getGlobalSiteManager`` are effectively broken; no ZCML directive should be using this function to find a registry to populate. You cannot use ZCML directives which use ``zope.component.getGlobalSiteManager`` within a Pyramid application without passing the ZCA global registry to the :term:`Configurator` constructor at application startup, as per :ref:`using_the_zca_global_registry`. One alternative exists: fix the ZCML directive to use ``getSiteManager`` rather than ``getGlobalSiteManager``. If a directive disuses ``getGlobalSiteManager``, the ``hook_zca`` method of using a component registry as documented in :ref:`hook_zca` will begin to work, allowing you to make use of the ZCML directive without also using the ZCA global registry.