zope.browser-2.1.0/0000775000175000017500000000000012447332053015322 5ustar tseavertseaver00000000000000zope.browser-2.1.0/setup.cfg0000664000175000017500000000007312447332053017143 0ustar tseavertseaver00000000000000[egg_info] tag_build = tag_date = 0 tag_svn_revision = 0 zope.browser-2.1.0/buildout.cfg0000664000175000017500000000024312447264525017641 0ustar tseavertseaver00000000000000[buildout] develop = . parts = test py [test] recipe = zc.recipe.testrunner eggs = zope.browser [py] recipe = zc.recipe.egg eggs = zope.browser interpreter = py zope.browser-2.1.0/PKG-INFO0000664000175000017500000001400012447332053016412 0ustar tseavertseaver00000000000000Metadata-Version: 1.1 Name: zope.browser Version: 2.1.0 Summary: Shared Zope Toolkit browser components Home-page: http://pypi.python.org/pypi/zope.browser Author: Zope Foundation and Contributors Author-email: zope-dev@zope.org License: ZPL 2.1 Description: zope.browser ============ .. image:: https://travis-ci.org/zopefoundation/zope.browser.png?branch=master :target: https://travis-ci.org/zopefoundation/zope.browser This package provides shared browser components for the Zope Toolkit. .. contents:: IView ----- Views adapt both a context and a request. There is not much we can test except that ``IView`` is importable and an interface: >>> from zope.interface import Interface >>> from zope.browser.interfaces import IView >>> Interface.providedBy(IView) True IBrowserView ------------- Browser views are views specialized for requests from a browser (e.g., as distinct from WebDAV, FTP, XML-RPC, etc.). There is not much we can test except that ``IBrowserView`` is importable and an interface derived from ``IView``: >>> from zope.interface import Interface >>> from zope.browser.interfaces import IBrowserView >>> Interface.providedBy(IBrowserView) True >>> IBrowserView.extends(IView) True IAdding ------- Adding views manage how newly-created items get added to containers. There is not much we can test except that ``IAdding`` is importable and an interface derived from ``IBrowserView``: >>> from zope.interface import Interface >>> from zope.browser.interfaces import IAdding >>> Interface.providedBy(IBrowserView) True >>> IAdding.extends(IBrowserView) True ITerms ------ The ``ITerms`` interface is used as a base for ``ISource`` widget implementations. This interfaces get used by ``zope.app.form`` and was initially defined in ``zope.app.form.browser.interfaces``, which made it impossible to use for other packages like ``z3c.form`` wihtout depending on ``zope.app.form``. Moving such base components / interfaces to ``zope.browser`` makes it possible to share them without undesirable dependencies. There is not much we can test except that ITerms is importable and an interface: >>> from zope.interface import Interface >>> from zope.browser.interfaces import ITerms >>> Interface.providedBy(ITerms) True ISystemErrorView ---------------- Views providing this interface can classify their contexts as system errors. These errors can be handled in a special way (e. g. more detailed logging). There is not much we can test except that ISystemErrorView is importable and an interface: >>> from zope.interface import Interface >>> from zope.browser.interfaces import ISystemErrorView >>> Interface.providedBy(ISystemErrorView) True Changelog ========= 2.1.0 (2014-12-26) ------------------ - Add support for Python 3.4. - Add support for testing on Travis. 2.0.2 (2013-03-08) ------------------ - Add Trove classifiers indicating CPython, 3.2 and PyPy support. 2.0.1 (2013-02-11) ------------------ - Add support for testing with tox. 2.0.0 (2013-02-11) ------------------ - Test coverage of 100% verified. - Add support for Python 3.3 and PyPy. - Drop support for Python 2.4 and 2.5. 1.3 (2010-04-30) ---------------- - Remove ``test`` extra and ``zope.testing`` dependency. 1.2 (2009-05-18) ---------------- - Move ``ISystemErrorView`` interface here from ``zope.app.exception`` to break undesirable dependencies. - Fix home page and author's e-mail address. - Add doctests to ``long_description``. 1.1 (2009-05-13) ---------------- - Move ``IAdding`` interface here from ``zope.app.container.interfaces`` to break undesirable dependencies. 1.0 (2009-05-13) ---------------- - Move ``IView`` and ``IBrowserView`` interfaces here from ``zope.publisher.interfaces`` to break undesirable dependencies. 0.5.0 (2008-12-11) ------------------ - Move ``ITerms`` interface here from ``zope.app.form.browser.interfaces`` to break undesirable dependencies. Keywords: zope browser component Platform: UNKNOWN Classifier: Development Status :: 5 - Production/Stable Classifier: Environment :: Web Environment Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: Zope Public License 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 :: 3.4 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Natural Language :: English Classifier: Operating System :: OS Independent Classifier: Topic :: Internet :: WWW/HTTP Classifier: Framework :: Zope3 zope.browser-2.1.0/tox.ini0000664000175000017500000000104412447331422016633 0ustar tseavertseaver00000000000000[tox] envlist = py26,py27,py32,py33,py34,pypy,pypy3 [testenv] commands = python setup.py test -q deps = zope.interface [testenv:coverage] basepython = python2.7 commands = # The installed version messes up nose's test discovery / coverage reporting # So, we uninstall that from the environment, and then install the editable # version, before running nosetests. pip uninstall -y zope.browser pip install -e . nosetests --with-xunit --with-xcoverage deps = nose coverage nosexcover zope.interface zope.browser-2.1.0/.gitignore0000664000175000017500000000013612447264525017322 0ustar tseavertseaver00000000000000*.pyc *.so *.dll __pycache__ src/*.egg-info .installed.cfg .tox bin build develop-eggs parts zope.browser-2.1.0/setup.py0000664000175000017500000000472012447331772017046 0ustar tseavertseaver00000000000000############################################################################## # # Copyright (c) 2006 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL 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. # ############################################################################## """Setup for zope.browser package""" import os from setuptools import setup, find_packages def read(*rnames): return open(os.path.join(os.path.dirname(__file__), *rnames)).read() setup(name='zope.browser', version='2.1.0', author='Zope Foundation and Contributors', author_email='zope-dev@zope.org', description='Shared Zope Toolkit browser components', long_description=( read('README.rst') + '\n\n.. contents::\n\n' + read('src', 'zope', 'browser', 'README.txt') + '\n\n' + read('CHANGES.rst') ), license='ZPL 2.1', keywords = "zope browser component", classifiers = [ 'Development Status :: 5 - Production/Stable', 'Environment :: Web Environment', 'Intended Audience :: Developers', 'License :: OSI Approved :: Zope Public License', '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 :: 3.4', 'Programming Language :: Python :: Implementation :: CPython', 'Programming Language :: Python :: Implementation :: PyPy', 'Natural Language :: English', 'Operating System :: OS Independent', 'Topic :: Internet :: WWW/HTTP', 'Framework :: Zope3'], url='http://pypi.python.org/pypi/zope.browser', packages=find_packages('src'), package_dir = {'': 'src'}, namespace_packages=['zope',], install_requires=[ 'setuptools', 'zope.interface', ], test_suite='zope.browser.tests.test_suite', include_package_data = True, zip_safe = False, ) zope.browser-2.1.0/bootstrap.py0000664000175000017500000001454512447264525017732 0ustar tseavertseaver00000000000000############################################################################## # # Copyright (c) 2006 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL 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. # ############################################################################## """Bootstrap a buildout-based project Simply run this script in a directory containing a buildout.cfg. The script accepts buildout command-line options, so you can use the -c option to specify an alternate configuration file. """ import os import shutil import sys import tempfile from optparse import OptionParser tmpeggs = tempfile.mkdtemp() usage = '''\ [DESIRED PYTHON FOR BUILDOUT] bootstrap.py [options] Bootstraps a buildout-based project. Simply run this script in a directory containing a buildout.cfg, using the Python that you want bin/buildout to use. Note that by using --find-links to point to local resources, you can keep this script from going over the network. ''' parser = OptionParser(usage=usage) parser.add_option("-v", "--version", help="use a specific zc.buildout version") parser.add_option("-t", "--accept-buildout-test-releases", dest='accept_buildout_test_releases', action="store_true", default=False, help=("Normally, if you do not specify a --version, the " "bootstrap script and buildout gets the newest " "*final* versions of zc.buildout and its recipes and " "extensions for you. If you use this flag, " "bootstrap and buildout will get the newest releases " "even if they are alphas or betas.")) parser.add_option("-c", "--config-file", help=("Specify the path to the buildout configuration " "file to be used.")) parser.add_option("-f", "--find-links", help=("Specify a URL to search for buildout releases")) parser.add_option("--allow-site-packages", action="store_true", default=False, help=("Let bootstrap.py use existing site packages")) parser.add_option("--setuptools-version", help="use a specific setuptools version") options, args = parser.parse_args() ###################################################################### # load/install setuptools try: if options.allow_site_packages: import setuptools import pkg_resources from urllib.request import urlopen except ImportError: from urllib2 import urlopen ez = {} exec(urlopen('https://bootstrap.pypa.io/ez_setup.py').read(), ez) if not options.allow_site_packages: # ez_setup imports site, which adds site packages # this will remove them from the path to ensure that incompatible versions # of setuptools are not in the path import site # inside a virtualenv, there is no 'getsitepackages'. # We can't remove these reliably if hasattr(site, 'getsitepackages'): for sitepackage_path in site.getsitepackages(): sys.path[:] = [x for x in sys.path if sitepackage_path not in x] setup_args = dict(to_dir=tmpeggs, download_delay=0) if options.setuptools_version is not None: setup_args['version'] = options.setuptools_version ez['use_setuptools'](**setup_args) import setuptools import pkg_resources # This does not (always?) update the default working set. We will # do it. for path in sys.path: if path not in pkg_resources.working_set.entries: pkg_resources.working_set.add_entry(path) ###################################################################### # Install buildout ws = pkg_resources.working_set cmd = [sys.executable, '-c', 'from setuptools.command.easy_install import main; main()', '-mZqNxd', tmpeggs] find_links = os.environ.get( 'bootstrap-testing-find-links', options.find_links or ('http://downloads.buildout.org/' if options.accept_buildout_test_releases else None) ) if find_links: cmd.extend(['-f', find_links]) setuptools_path = ws.find( pkg_resources.Requirement.parse('setuptools')).location requirement = 'zc.buildout' version = options.version if version is None and not options.accept_buildout_test_releases: # Figure out the most recent final version of zc.buildout. import setuptools.package_index _final_parts = '*final-', '*final' def _final_version(parsed_version): try: return not parsed_version.is_prerelease except AttributeError: # Older setuptools for part in parsed_version: if (part[:1] == '*') and (part not in _final_parts): return False return True index = setuptools.package_index.PackageIndex( search_path=[setuptools_path]) if find_links: index.add_find_links((find_links,)) req = pkg_resources.Requirement.parse(requirement) if index.obtain(req) is not None: best = [] bestv = None for dist in index[req.project_name]: distv = dist.parsed_version if _final_version(distv): if bestv is None or distv > bestv: best = [dist] bestv = distv elif distv == bestv: best.append(dist) if best: best.sort() version = best[-1].version if version: requirement = '=='.join((requirement, version)) cmd.append(requirement) import subprocess if subprocess.call(cmd, env=dict(os.environ, PYTHONPATH=setuptools_path)) != 0: raise Exception( "Failed to execute command:\n%s" % repr(cmd)[1:-1]) ###################################################################### # Import and run buildout ws.add_entry(tmpeggs) ws.require(requirement) import zc.buildout.buildout if not [a for a in args if '=' not in a]: args.append('bootstrap') # if -c was provided, we push it back into args for buildout' main function if options.config_file is not None: args[0:0] = ['-c', options.config_file] zc.buildout.buildout.main(args) shutil.rmtree(tmpeggs) zope.browser-2.1.0/.travis.yml0000664000175000017500000000032512447331415017434 0ustar tseavertseaver00000000000000language: python sudo: false python: - 2.6 - 2.7 - 3.3 - 3.4 - pypy - pypy3 install: - pip install . --use-mirrors script: - python setup.py test -q notifications: email: false zope.browser-2.1.0/src/0000775000175000017500000000000012447332053016111 5ustar tseavertseaver00000000000000zope.browser-2.1.0/src/zope.browser.egg-info/0000775000175000017500000000000012447332053022242 5ustar tseavertseaver00000000000000zope.browser-2.1.0/src/zope.browser.egg-info/top_level.txt0000664000175000017500000000000512447332052024766 0ustar tseavertseaver00000000000000zope zope.browser-2.1.0/src/zope.browser.egg-info/SOURCES.txt0000664000175000017500000000104412447332053024125 0ustar tseavertseaver00000000000000.gitignore .travis.yml CHANGES.rst COPYRIGHT.txt LICENSE.txt MANIFEST.in README.rst bootstrap.py buildout.cfg setup.py tox.ini src/zope/__init__.py src/zope.browser.egg-info/PKG-INFO src/zope.browser.egg-info/SOURCES.txt src/zope.browser.egg-info/dependency_links.txt src/zope.browser.egg-info/namespace_packages.txt src/zope.browser.egg-info/not-zip-safe src/zope.browser.egg-info/requires.txt src/zope.browser.egg-info/top_level.txt src/zope/browser/README.txt src/zope/browser/__init__.py src/zope/browser/interfaces.py src/zope/browser/tests.pyzope.browser-2.1.0/src/zope.browser.egg-info/PKG-INFO0000664000175000017500000001400012447332052023331 0ustar tseavertseaver00000000000000Metadata-Version: 1.1 Name: zope.browser Version: 2.1.0 Summary: Shared Zope Toolkit browser components Home-page: http://pypi.python.org/pypi/zope.browser Author: Zope Foundation and Contributors Author-email: zope-dev@zope.org License: ZPL 2.1 Description: zope.browser ============ .. image:: https://travis-ci.org/zopefoundation/zope.browser.png?branch=master :target: https://travis-ci.org/zopefoundation/zope.browser This package provides shared browser components for the Zope Toolkit. .. contents:: IView ----- Views adapt both a context and a request. There is not much we can test except that ``IView`` is importable and an interface: >>> from zope.interface import Interface >>> from zope.browser.interfaces import IView >>> Interface.providedBy(IView) True IBrowserView ------------- Browser views are views specialized for requests from a browser (e.g., as distinct from WebDAV, FTP, XML-RPC, etc.). There is not much we can test except that ``IBrowserView`` is importable and an interface derived from ``IView``: >>> from zope.interface import Interface >>> from zope.browser.interfaces import IBrowserView >>> Interface.providedBy(IBrowserView) True >>> IBrowserView.extends(IView) True IAdding ------- Adding views manage how newly-created items get added to containers. There is not much we can test except that ``IAdding`` is importable and an interface derived from ``IBrowserView``: >>> from zope.interface import Interface >>> from zope.browser.interfaces import IAdding >>> Interface.providedBy(IBrowserView) True >>> IAdding.extends(IBrowserView) True ITerms ------ The ``ITerms`` interface is used as a base for ``ISource`` widget implementations. This interfaces get used by ``zope.app.form`` and was initially defined in ``zope.app.form.browser.interfaces``, which made it impossible to use for other packages like ``z3c.form`` wihtout depending on ``zope.app.form``. Moving such base components / interfaces to ``zope.browser`` makes it possible to share them without undesirable dependencies. There is not much we can test except that ITerms is importable and an interface: >>> from zope.interface import Interface >>> from zope.browser.interfaces import ITerms >>> Interface.providedBy(ITerms) True ISystemErrorView ---------------- Views providing this interface can classify their contexts as system errors. These errors can be handled in a special way (e. g. more detailed logging). There is not much we can test except that ISystemErrorView is importable and an interface: >>> from zope.interface import Interface >>> from zope.browser.interfaces import ISystemErrorView >>> Interface.providedBy(ISystemErrorView) True Changelog ========= 2.1.0 (2014-12-26) ------------------ - Add support for Python 3.4. - Add support for testing on Travis. 2.0.2 (2013-03-08) ------------------ - Add Trove classifiers indicating CPython, 3.2 and PyPy support. 2.0.1 (2013-02-11) ------------------ - Add support for testing with tox. 2.0.0 (2013-02-11) ------------------ - Test coverage of 100% verified. - Add support for Python 3.3 and PyPy. - Drop support for Python 2.4 and 2.5. 1.3 (2010-04-30) ---------------- - Remove ``test`` extra and ``zope.testing`` dependency. 1.2 (2009-05-18) ---------------- - Move ``ISystemErrorView`` interface here from ``zope.app.exception`` to break undesirable dependencies. - Fix home page and author's e-mail address. - Add doctests to ``long_description``. 1.1 (2009-05-13) ---------------- - Move ``IAdding`` interface here from ``zope.app.container.interfaces`` to break undesirable dependencies. 1.0 (2009-05-13) ---------------- - Move ``IView`` and ``IBrowserView`` interfaces here from ``zope.publisher.interfaces`` to break undesirable dependencies. 0.5.0 (2008-12-11) ------------------ - Move ``ITerms`` interface here from ``zope.app.form.browser.interfaces`` to break undesirable dependencies. Keywords: zope browser component Platform: UNKNOWN Classifier: Development Status :: 5 - Production/Stable Classifier: Environment :: Web Environment Classifier: Intended Audience :: Developers Classifier: License :: OSI Approved :: Zope Public License 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 :: 3.4 Classifier: Programming Language :: Python :: Implementation :: CPython Classifier: Programming Language :: Python :: Implementation :: PyPy Classifier: Natural Language :: English Classifier: Operating System :: OS Independent Classifier: Topic :: Internet :: WWW/HTTP Classifier: Framework :: Zope3 zope.browser-2.1.0/src/zope.browser.egg-info/dependency_links.txt0000664000175000017500000000000112447332052026307 0ustar tseavertseaver00000000000000 zope.browser-2.1.0/src/zope.browser.egg-info/not-zip-safe0000664000175000017500000000000112447264767024510 0ustar tseavertseaver00000000000000 zope.browser-2.1.0/src/zope.browser.egg-info/namespace_packages.txt0000664000175000017500000000000512447332052026567 0ustar tseavertseaver00000000000000zope zope.browser-2.1.0/src/zope.browser.egg-info/requires.txt0000664000175000017500000000003212447332052024634 0ustar tseavertseaver00000000000000setuptools zope.interface zope.browser-2.1.0/src/zope/0000775000175000017500000000000012447332053017066 5ustar tseavertseaver00000000000000zope.browser-2.1.0/src/zope/__init__.py0000664000175000017500000000031012447264525021201 0ustar tseavertseaver00000000000000# this is a namespace package try: import pkg_resources pkg_resources.declare_namespace(__name__) except ImportError: import pkgutil __path__ = pkgutil.extend_path(__path__, __name__) zope.browser-2.1.0/src/zope/browser/0000775000175000017500000000000012447332053020551 5ustar tseavertseaver00000000000000zope.browser-2.1.0/src/zope/browser/__init__.py0000664000175000017500000000002112447264525022663 0ustar tseavertseaver00000000000000# make a package zope.browser-2.1.0/src/zope/browser/README.txt0000664000175000017500000000424612447264525022265 0ustar tseavertseaver00000000000000IView ----- Views adapt both a context and a request. There is not much we can test except that ``IView`` is importable and an interface: >>> from zope.interface import Interface >>> from zope.browser.interfaces import IView >>> Interface.providedBy(IView) True IBrowserView ------------- Browser views are views specialized for requests from a browser (e.g., as distinct from WebDAV, FTP, XML-RPC, etc.). There is not much we can test except that ``IBrowserView`` is importable and an interface derived from ``IView``: >>> from zope.interface import Interface >>> from zope.browser.interfaces import IBrowserView >>> Interface.providedBy(IBrowserView) True >>> IBrowserView.extends(IView) True IAdding ------- Adding views manage how newly-created items get added to containers. There is not much we can test except that ``IAdding`` is importable and an interface derived from ``IBrowserView``: >>> from zope.interface import Interface >>> from zope.browser.interfaces import IAdding >>> Interface.providedBy(IBrowserView) True >>> IAdding.extends(IBrowserView) True ITerms ------ The ``ITerms`` interface is used as a base for ``ISource`` widget implementations. This interfaces get used by ``zope.app.form`` and was initially defined in ``zope.app.form.browser.interfaces``, which made it impossible to use for other packages like ``z3c.form`` wihtout depending on ``zope.app.form``. Moving such base components / interfaces to ``zope.browser`` makes it possible to share them without undesirable dependencies. There is not much we can test except that ITerms is importable and an interface: >>> from zope.interface import Interface >>> from zope.browser.interfaces import ITerms >>> Interface.providedBy(ITerms) True ISystemErrorView ---------------- Views providing this interface can classify their contexts as system errors. These errors can be handled in a special way (e. g. more detailed logging). There is not much we can test except that ISystemErrorView is importable and an interface: >>> from zope.interface import Interface >>> from zope.browser.interfaces import ISystemErrorView >>> Interface.providedBy(ISystemErrorView) True zope.browser-2.1.0/src/zope/browser/interfaces.py0000664000175000017500000000657512447264525023273 0ustar tseavertseaver00000000000000############################################################################## # # Copyright (c) 2004-2009 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL 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. # ############################################################################## """Shared dependency less Zope3 brwoser components. """ __docformat__ = 'restructuredtext' from zope.interface import Attribute from zope.interface import Interface class IView(Interface): """ Views are multi-adapters for context and request objects. """ context = Attribute("The context object the view renders") request = Attribute("The request object driving the view") class IBrowserView(IView): """ Views which are specialized for requests from a browser o Such views are distinct from those geerated via WebDAV, FTP, XML-RPC, etc.. """ class IAdding(IBrowserView): """ Multi-adapter interface for views which add items to containers. o The 'context' of the view must implement ``zope.container.IContainer``. """ def add(content): """Add content object to context. Add using the name in `contentName`. Return the added object in the context of its container. If `contentName` is already used in container, raise ``zope.container.interfaces.DuplicateIDError``. """ contentName = Attribute( """The content name, usually set by the Adder traverser. If the content name hasn't been defined yet, returns ``None``. Some creation views might use this to optionally display the name on forms. """ ) def nextURL(): """Return the URL that the creation view should redirect to. This is called by the creation view after calling add. It is the adder's responsibility, not the creation view's to decide what page to display after content is added. """ def nameAllowed(): """Return whether names can be input by the user. """ def addingInfo(): """Return add menu data as a sequence of mappings. Each mapping contains 'action', 'title', and possibly other keys. The result is sorted by title. """ def isSingleMenuItem(): """Return whether there is single menu item or not.""" def hasCustomAddView(): "This should be called only if there is `singleMenuItem` else return 0" class ITerms(Interface): """ Adapter providing lookups for vocabulary terms. """ def getTerm(value): """Return an ITitledTokenizedTerm object for the given value LookupError is raised if the value isn't in the source """ def getValue(token): """Return a value for a given identifier token LookupError is raised if there isn't a value in the source. """ class ISystemErrorView(Interface): """Error views that can classify their contexts as system errors """ def isSystemError(): """Return a boolean indicating whether the error is a system errror """ zope.browser-2.1.0/src/zope/browser/tests.py0000664000175000017500000000166512447264525022305 0ustar tseavertseaver00000000000000############################################################################## # # Copyright (c) 2007 Zope Foundation and Contributors. # All Rights Reserved. # # This software is subject to the provisions of the Zope Public License, # Version 2.1 (ZPL). A copy of the ZPL 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. # ############################################################################## """Test Suite""" import doctest import unittest def test_suite(): return unittest.TestSuite(( doctest.DocFileSuite('README.txt', optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS, ), )) if __name__ == '__main__': unittest.main(defaultTest='test_suite') zope.browser-2.1.0/COPYRIGHT.txt0000664000175000017500000000004012447264525017435 0ustar tseavertseaver00000000000000Zope Foundation and Contributorszope.browser-2.1.0/CHANGES.rst0000664000175000017500000000234012447332021017116 0ustar tseavertseaver00000000000000Changelog ========= 2.1.0 (2014-12-26) ------------------ - Add support for Python 3.4. - Add support for testing on Travis. 2.0.2 (2013-03-08) ------------------ - Add Trove classifiers indicating CPython, 3.2 and PyPy support. 2.0.1 (2013-02-11) ------------------ - Add support for testing with tox. 2.0.0 (2013-02-11) ------------------ - Test coverage of 100% verified. - Add support for Python 3.3 and PyPy. - Drop support for Python 2.4 and 2.5. 1.3 (2010-04-30) ---------------- - Remove ``test`` extra and ``zope.testing`` dependency. 1.2 (2009-05-18) ---------------- - Move ``ISystemErrorView`` interface here from ``zope.app.exception`` to break undesirable dependencies. - Fix home page and author's e-mail address. - Add doctests to ``long_description``. 1.1 (2009-05-13) ---------------- - Move ``IAdding`` interface here from ``zope.app.container.interfaces`` to break undesirable dependencies. 1.0 (2009-05-13) ---------------- - Move ``IView`` and ``IBrowserView`` interfaces here from ``zope.publisher.interfaces`` to break undesirable dependencies. 0.5.0 (2008-12-11) ------------------ - Move ``ITerms`` interface here from ``zope.app.form.browser.interfaces`` to break undesirable dependencies. zope.browser-2.1.0/LICENSE.txt0000664000175000017500000000402612447264525017157 0ustar tseavertseaver00000000000000Zope Public License (ZPL) Version 2.1 A copyright notice accompanies this license document that identifies the copyright holders. This license has been certified as open source. It has also been designated as GPL compatible by the Free Software Foundation (FSF). Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions in source code must retain the accompanying copyright notice, this list of conditions, and the following disclaimer. 2. Redistributions in binary form must reproduce the accompanying copyright notice, this list of conditions, and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Names of the copyright holders must not be used to endorse or promote products derived from this software without prior written permission from the copyright holders. 4. The right to distribute this software or to use it for any purpose does not give you the right to use Servicemarks (sm) or Trademarks (tm) of the copyright holders. Use of them is covered by separate agreement with the copyright holders. 5. If any files are modified, you must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. Disclaimer THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. zope.browser-2.1.0/README.rst0000664000175000017500000000036412447331550017015 0ustar tseavertseaver00000000000000zope.browser ============ .. image:: https://travis-ci.org/zopefoundation/zope.browser.png?branch=master :target: https://travis-ci.org/zopefoundation/zope.browser This package provides shared browser components for the Zope Toolkit. zope.browser-2.1.0/MANIFEST.in0000664000175000017500000000020512447264525017065 0ustar tseavertseaver00000000000000include *.rst include *.txt include tox.ini include bootstrap.py include buildout.cfg recursive-include src * global-exclude *.pyc