[Checkins] SVN: Sandbox/jens/zmi.core/trunk/ - initial checkin
Jens Vagelpohl
jens at dataflake.org
Wed Nov 16 09:21:37 UTC 2011
Log message for revision 123358:
- initial checkin
Changed:
A Sandbox/jens/zmi.core/trunk/
A Sandbox/jens/zmi.core/trunk/CHANGES.txt
A Sandbox/jens/zmi.core/trunk/COPYRIGHT.txt
A Sandbox/jens/zmi.core/trunk/LICENSE.txt
A Sandbox/jens/zmi.core/trunk/README.txt
A Sandbox/jens/zmi.core/trunk/VERSION.txt
A Sandbox/jens/zmi.core/trunk/bootstrap.py
A Sandbox/jens/zmi.core/trunk/buildout.cfg
A Sandbox/jens/zmi.core/trunk/docs/
A Sandbox/jens/zmi.core/trunk/docs/Makefile
A Sandbox/jens/zmi.core/trunk/docs/_build/
A Sandbox/jens/zmi.core/trunk/docs/_static/
A Sandbox/jens/zmi.core/trunk/docs/_templates/
A Sandbox/jens/zmi.core/trunk/docs/api.rst
A Sandbox/jens/zmi.core/trunk/docs/conf.py
A Sandbox/jens/zmi.core/trunk/docs/hacking.rst
A Sandbox/jens/zmi.core/trunk/docs/index.rst
A Sandbox/jens/zmi.core/trunk/docs/make.bat
A Sandbox/jens/zmi.core/trunk/docs/usage.rst
A Sandbox/jens/zmi.core/trunk/instance.cfg
A Sandbox/jens/zmi.core/trunk/setup.py
A Sandbox/jens/zmi.core/trunk/src/
A Sandbox/jens/zmi.core/trunk/src/zmi/
A Sandbox/jens/zmi.core/trunk/src/zmi/__init__.py
A Sandbox/jens/zmi.core/trunk/src/zmi/core/
A Sandbox/jens/zmi.core/trunk/src/zmi/core/__init__.py
A Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/
A Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/__init__.py
A Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/base.py
A Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/configure.zcml
A Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/templates/
A Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/templates/zmi_interfaces.pt
A Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/zmi_interfaces.py
A Sandbox/jens/zmi.core/trunk/src/zmi/core/configure.zcml
A Sandbox/jens/zmi.core/trunk/src/zmi/core/tests.py
-=-
Added: Sandbox/jens/zmi.core/trunk/CHANGES.txt
===================================================================
--- Sandbox/jens/zmi.core/trunk/CHANGES.txt (rev 0)
+++ Sandbox/jens/zmi.core/trunk/CHANGES.txt 2011-11-16 09:21:36 UTC (rev 123358)
@@ -0,0 +1,8 @@
+``zmi.core`` Changelog
+======================
+
+
+1.0 (unreleased)
+----------------
+
+- Initial release
Property changes on: Sandbox/jens/zmi.core/trunk/CHANGES.txt
___________________________________________________________________
Added: svn:eol-style
+ native
Added: Sandbox/jens/zmi.core/trunk/COPYRIGHT.txt
===================================================================
--- Sandbox/jens/zmi.core/trunk/COPYRIGHT.txt (rev 0)
+++ Sandbox/jens/zmi.core/trunk/COPYRIGHT.txt 2011-11-16 09:21:36 UTC (rev 123358)
@@ -0,0 +1 @@
+Zope Foundation and Contributors
\ No newline at end of file
Property changes on: Sandbox/jens/zmi.core/trunk/COPYRIGHT.txt
___________________________________________________________________
Added: svn:eol-style
+ native
Added: Sandbox/jens/zmi.core/trunk/LICENSE.txt
===================================================================
--- Sandbox/jens/zmi.core/trunk/LICENSE.txt (rev 0)
+++ Sandbox/jens/zmi.core/trunk/LICENSE.txt 2011-11-16 09:21:36 UTC (rev 123358)
@@ -0,0 +1,44 @@
+Zope 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.
Property changes on: Sandbox/jens/zmi.core/trunk/LICENSE.txt
___________________________________________________________________
Added: svn:eol-style
+ native
Added: Sandbox/jens/zmi.core/trunk/README.txt
===================================================================
--- Sandbox/jens/zmi.core/trunk/README.txt (rev 0)
+++ Sandbox/jens/zmi.core/trunk/README.txt 2011-11-16 09:21:36 UTC (rev 123358)
@@ -0,0 +1,7 @@
+``zmi.core`` README
+=====================
+
+The ``zmi.core`` package provides core components for the new
+Zope ZMI.
+
+Please see ``doc/index.rst`` for the documentation.
Property changes on: Sandbox/jens/zmi.core/trunk/README.txt
___________________________________________________________________
Added: svn:eol-style
+ native
Added: Sandbox/jens/zmi.core/trunk/VERSION.txt
===================================================================
--- Sandbox/jens/zmi.core/trunk/VERSION.txt (rev 0)
+++ Sandbox/jens/zmi.core/trunk/VERSION.txt 2011-11-16 09:21:36 UTC (rev 123358)
@@ -0,0 +1 @@
+1.0dev
Property changes on: Sandbox/jens/zmi.core/trunk/VERSION.txt
___________________________________________________________________
Added: svn:eol-style
+ native
Added: Sandbox/jens/zmi.core/trunk/bootstrap.py
===================================================================
--- Sandbox/jens/zmi.core/trunk/bootstrap.py (rev 0)
+++ Sandbox/jens/zmi.core/trunk/bootstrap.py 2011-11-16 09:21:36 UTC (rev 123358)
@@ -0,0 +1,64 @@
+##############################################################################
+#
+# 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, shutil, sys, tempfile, urllib2
+
+tmpeggs = tempfile.mkdtemp()
+
+ez = {}
+exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py'
+ ).read() in ez
+ez['use_setuptools'](to_dir=tmpeggs, download_delay=0)
+
+import pkg_resources
+
+cmd = 'from setuptools.command.easy_install import main; main()'
+if sys.platform == 'win32':
+ cmd = '"%s"' % cmd # work around spawn lamosity on windows
+
+ws = pkg_resources.working_set
+
+is_jython = sys.platform.startswith('java')
+
+if is_jython:
+ import subprocess
+
+ assert subprocess.Popen([sys.executable] + ['-c', cmd, '-mqNxd', tmpeggs,
+ 'zc.buildout'],
+ env = dict(os.environ,
+ PYTHONPATH=
+ ws.find(pkg_resources.Requirement.parse('setuptools')).location
+ ),
+ ).wait() == 0
+else:
+ assert os.spawnle(
+ os.P_WAIT, sys.executable, sys.executable,
+ '-c', cmd, '-mqNxd', tmpeggs, 'zc.buildout',
+ dict(os.environ,
+ PYTHONPATH=
+ ws.find(pkg_resources.Requirement.parse('setuptools')).location
+ ),
+ ) == 0
+
+ws.add_entry(tmpeggs)
+ws.require('zc.buildout')
+import zc.buildout.buildout
+zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap'])
+shutil.rmtree(tmpeggs)
Property changes on: Sandbox/jens/zmi.core/trunk/bootstrap.py
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: Sandbox/jens/zmi.core/trunk/buildout.cfg
===================================================================
--- Sandbox/jens/zmi.core/trunk/buildout.cfg (rev 0)
+++ Sandbox/jens/zmi.core/trunk/buildout.cfg 2011-11-16 09:21:36 UTC (rev 123358)
@@ -0,0 +1,15 @@
+[buildout]
+develop = .
+parts =
+ test
+ sphinx
+
+[test]
+recipe = zc.recipe.testrunner
+eggs = zmi.core
+
+[sphinx]
+recipe = zc.recipe.egg
+eggs =
+ Sphinx
+ zmi.core
Added: Sandbox/jens/zmi.core/trunk/docs/Makefile
===================================================================
--- Sandbox/jens/zmi.core/trunk/docs/Makefile (rev 0)
+++ Sandbox/jens/zmi.core/trunk/docs/Makefile 2011-11-16 09:21:36 UTC (rev 123358)
@@ -0,0 +1,89 @@
+# Makefile for Sphinx documentation
+#
+
+# You can set these variables from the command line.
+SPHINXOPTS =
+SPHINXBUILD = sphinx-build
+PAPER =
+BUILDDIR = _build
+
+# Internal variables.
+PAPEROPT_a4 = -D latex_paper_size=a4
+PAPEROPT_letter = -D latex_paper_size=letter
+ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
+
+.PHONY: help clean html dirhtml pickle json htmlhelp qthelp latex changes linkcheck doctest
+
+help:
+ @echo "Please use \`make <target>' where <target> is one of"
+ @echo " html to make standalone HTML files"
+ @echo " dirhtml to make HTML files named index.html in directories"
+ @echo " pickle to make pickle files"
+ @echo " json to make JSON files"
+ @echo " htmlhelp to make HTML files and a HTML help project"
+ @echo " qthelp to make HTML files and a qthelp project"
+ @echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
+ @echo " changes to make an overview of all changed/added/deprecated items"
+ @echo " linkcheck to check all external links for integrity"
+ @echo " doctest to run all doctests embedded in the documentation (if enabled)"
+
+clean:
+ -rm -rf $(BUILDDIR)/*
+
+html:
+ $(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
+
+dirhtml:
+ $(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
+ @echo
+ @echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
+
+pickle:
+ $(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
+ @echo
+ @echo "Build finished; now you can process the pickle files."
+
+json:
+ $(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
+ @echo
+ @echo "Build finished; now you can process the JSON files."
+
+htmlhelp:
+ $(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
+ @echo
+ @echo "Build finished; now you can run HTML Help Workshop with the" \
+ ".hhp project file in $(BUILDDIR)/htmlhelp."
+
+qthelp:
+ $(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
+ @echo
+ @echo "Build finished; now you can run "qcollectiongenerator" with the" \
+ ".qhcp project file in $(BUILDDIR)/qthelp, like this:"
+ @echo "# qcollectiongenerator $(BUILDDIR)/qthelp/zopeevent.qhcp"
+ @echo "To view the help file:"
+ @echo "# assistant -collectionFile $(BUILDDIR)/qthelp/zopeevent.qhc"
+
+latex:
+ $(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
+ @echo
+ @echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
+ @echo "Run \`make all-pdf' or \`make all-ps' in that directory to" \
+ "run these through (pdf)latex."
+
+changes:
+ $(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
+ @echo
+ @echo "The overview file is in $(BUILDDIR)/changes."
+
+linkcheck:
+ $(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
+ @echo
+ @echo "Link check complete; look for any errors in the above output " \
+ "or in $(BUILDDIR)/linkcheck/output.txt."
+
+doctest:
+ $(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
+ @echo "Testing of doctests in the sources finished, look at the " \
+ "results in $(BUILDDIR)/doctest/output.txt."
Property changes on: Sandbox/jens/zmi.core/trunk/docs/Makefile
___________________________________________________________________
Added: svn:eol-style
+ native
Added: Sandbox/jens/zmi.core/trunk/docs/api.rst
===================================================================
--- Sandbox/jens/zmi.core/trunk/docs/api.rst (rev 0)
+++ Sandbox/jens/zmi.core/trunk/docs/api.rst 2011-11-16 09:21:36 UTC (rev 123358)
@@ -0,0 +1,12 @@
+:mod:`zmi.core` API Reference
+=============================
+
+The package exports the following API symbols.
+
+Data
+----
+
+
+Functions
+---------
+
Added: Sandbox/jens/zmi.core/trunk/docs/conf.py
===================================================================
--- Sandbox/jens/zmi.core/trunk/docs/conf.py (rev 0)
+++ Sandbox/jens/zmi.core/trunk/docs/conf.py 2011-11-16 09:21:36 UTC (rev 123358)
@@ -0,0 +1,205 @@
+# -*- coding: utf-8 -*-
+#
+# zmi.core documentation build configuration file, created by
+# sphinx-quickstart on Fri Apr 16 17:22:42 2010.
+#
+# This file is execfile()d with the current directory set to its containing dir.
+#
+# Note that not all possible configuration values are present in this
+# autogenerated file.
+#
+# All configuration values have a default; values that are commented out
+# serve to show the default.
+
+import sys, os, pkg_resources
+
+# If extensions (or modules to document with autodoc) are in another directory,
+# add these directories to sys.path 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('.'))
+sys.path.append(os.path.abspath('../src'))
+rqmt = pkg_resources.require('zmi.core')[0]
+
+# -- 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.doctest',
+ 'sphinx.ext.intersphinx',
+ 'sphinx.ext.coverage',
+]
+
+# Add any paths that contain templates here, relative to this directory.
+templates_path = ['_templates']
+
+# The suffix of source filenames.
+source_suffix = '.rst'
+
+# The encoding of source files.
+#source_encoding = 'utf-8'
+
+# The master toctree document.
+master_doc = 'index'
+
+# General information about the project.
+project = u'zmi.core'
+copyright = u'2011, Zope Foundation and Contributors'
+
+# The version info for the project you're documenting, acts as replacement for
+# |version| and |release|, also used in various other places throughout the
+# built documents.
+#
+# The short X.Y version.
+version = '%s.%s' % tuple(map(int, rqmt.version.split('.')[:2]))
+# The full version, including alpha/beta/rc tags.
+release = rqmt.version
+
+# The language for content autogenerated by Sphinx. Refer to documentation
+# for a list of supported languages.
+#language = None
+
+# 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 directory, that shouldn't be searched
+# for source files.
+exclude_trees = ['_build']
+
+# 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'
+
+# A list of ignored prefixes for module index sorting.
+#modindex_common_prefix = []
+
+
+# -- Options for HTML output ---------------------------------------------------
+
+# The theme to use for HTML and HTML Help pages. Major themes that come with
+# Sphinx are currently 'default' and 'sphinxdoc'.
+html_theme = 'default'
+
+# Theme options are theme-specific and customize the look and feel of a theme
+# further. For a list of options available for each theme, see the
+# documentation.
+#html_theme_options = {}
+
+# Add any paths that contain custom themes here, relative to this directory.
+#html_theme_path = []
+
+# The name for this set of Sphinx documents. If None, it defaults to
+# "<project> v<release> 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 (relative to this directory) to place at the top
+# of the sidebar.
+#html_logo = None
+
+# 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, links to the reST sources are added to the pages.
+#html_show_sourcelink = True
+
+# If true, an OpenSearch description file will be output, and all pages will
+# contain a <link> 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 = 'zmicoredoc'
+
+
+# -- 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, documentclass [howto/manual]).
+latex_documents = [
+ ('index', 'zmicore.tex', u'zmi.core Documentation',
+ u'Zope Foundation and Contributors', 'manual'),
+]
+
+# The name of an image file (relative to this directory) to place at the top of
+# the title page.
+#latex_logo = None
+
+# 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
+
+
+# Example configuration for intersphinx: refer to the Python standard library.
+intersphinx_mapping = {'http://docs.python.org/': None}
Property changes on: Sandbox/jens/zmi.core/trunk/docs/conf.py
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: Sandbox/jens/zmi.core/trunk/docs/hacking.rst
===================================================================
--- Sandbox/jens/zmi.core/trunk/docs/hacking.rst (rev 0)
+++ Sandbox/jens/zmi.core/trunk/docs/hacking.rst 2011-11-16 09:21:36 UTC (rev 123358)
@@ -0,0 +1,261 @@
+Hacking on :mod:`zmi.core`
+==========================
+
+
+Getting the Code
+-----------------
+
+The main repository for :mod:`zmi.core` is in the Zope Subversion
+repository:
+
+http://svn.zope.org/zmi.core
+
+You can get a read-only Subversion checkout from there:
+
+.. code-block:: sh
+
+ $ svn checkout svn://svn.zope.org/repos/main/zmi.core/trunk zmi.core
+
+The project also mirrors the trunk from the Subversion repository as a
+Bazaar branch on Launchpad:
+
+https://code.launchpad.net/zmi.core
+
+You can branch the trunk from there using Bazaar:
+
+.. code-block:: sh
+
+ $ bzr branch lp:zmi.core
+
+
+Running the tests in a ``virtualenv``
+-------------------------------------
+
+If you use the ``virtualenv`` package to create lightweight Python
+development environments, you can run the tests using nothing more
+than the ``python`` binary in a virtualenv. First, create a scratch
+environment:
+
+.. code-block:: sh
+
+ $ /path/to/virtualenv --no-site-packages /tmp/hack-zmi.core
+
+Next, get this package registered as a "development egg" in the
+environment:
+
+.. code-block:: sh
+
+ $ /tmp/hack-zmi.core/bin/python setup.py develop
+
+Finally, run the tests using the build-in ``setuptools`` testrunner:
+
+.. code-block:: sh
+
+ $ /tmp/hack-zmi.core/bin/python setup.py test
+ running test
+ ...
+ test_empty (zmi.core.tests.Test_notify) ... ok
+ test_not_empty (zmi.core.tests.Test_notify) ... ok
+
+ ----------------------------------------------------------------------
+ Ran 2 tests in 0.000s
+
+ OK
+
+If you have the :mod:`nose` package installed in the virtualenv, you can
+use its testrunner too:
+
+.. code-block:: sh
+
+ $ /tmp/hack-zmi.core/bin/easy_install nose
+ ...
+ $ /tmp/hack-zmi.core/bin/python setup.py nosetests
+ running nosetests
+ ...
+ ----------------------------------------------------------------------
+ Ran 3 tests in 0.011s
+
+ OK
+
+or:
+
+.. code-block:: sh
+
+ $ /tmp/hack-zmi.core/bin/nosetests
+ ...
+ ----------------------------------------------------------------------
+ Ran 3 tests in 0.011s
+
+ OK
+
+If you have the :mod:`coverage` pacakge installed in the virtualenv,
+you can see how well the tests cover the code:
+
+.. code-block:: sh
+
+ $ /tmp/hack-zmi.core/bin/easy_install nose coverage
+ ...
+ $ /tmp/hack-zmi.core/bin/python setup.py nosetests \
+ --with coverage --cover-package=zmi.core
+ running nosetests
+ ...
+ Name Stmts Exec Cover Missing
+ ------------------------------------------
+ zmi.core 5 5 100%
+ ----------------------------------------------------------------------
+ Ran 3 tests in 0.019s
+
+ OK
+
+
+Building the documentation in a ``virtualenv``
+----------------------------------------------
+
+:mod:`zmi.core` uses the nifty :mod:`Sphinx` documentation system
+for building its docs. Using the same virtualenv you set up to run the
+tests, you can build the docs:
+
+.. code-block:: sh
+
+ $ /tmp/hack-zmi.core/bin/easy_install Sphinx
+ ...
+ $ cd docs
+ $ PATH=/tmp/hack-zmi.core/bin:$PATH make html
+ sphinx-build -b html -d _build/doctrees . _build/html
+ ...
+ build succeeded.
+
+ Build finished. The HTML pages are in _build/html.
+
+You can also test the code snippets in the documentation:
+
+.. code-block:: sh
+
+ $ PATH=/tmp/hack-zmi.core/bin:$PATH make doctest
+ sphinx-build -b doctest -d _build/doctrees . _build/doctest
+ ...
+ running tests...
+
+ Document: index
+ ---------------
+ 1 items passed all tests:
+ 17 tests in default
+ 17 tests in 1 items.
+ 17 passed and 0 failed.
+ Test passed.
+
+ Doctest summary
+ ===============
+ 17 tests
+ 0 failures in tests
+ 0 failures in setup code
+ build succeeded.
+ Testing of doctests in the sources finished, look at the \
+ results in _build/doctest/output.txt.
+
+
+Running the tests using :mod:`zc.buildout`
+-------------------------------------------
+
+:mod:`zmi.core` ships with its own :file:`buildout.cfg` file and
+:file:`bootstrap.py` for setting up a development buildout:
+
+.. code-block:: sh
+
+ $ /path/to/python2.6 bootstrap.py
+ ...
+ Generated script '.../bin/buildout'
+ $ bin/buildout
+ Develop: '/home/tseaver/projects/Zope/BTK/event/.'
+ ...
+ Generated script '.../bin/sphinx-quickstart'.
+ Generated script '.../bin/sphinx-build'.
+
+You can now run the tests:
+
+.. code-block:: sh
+
+ $ bin/test --all
+ Running zope.testing.testrunner.layer.UnitTests tests:
+ Set up zope.testing.testrunner.layer.UnitTests in 0.000 seconds.
+ Ran 2 tests with 0 failures and 0 errors in 0.000 seconds.
+ Tearing down left over layers:
+ Tear down zope.testing.testrunner.layer.UnitTests in 0.000 seconds.
+
+
+Building the documentation using :mod:`zc.buildout`
+---------------------------------------------------
+
+The :mod:`zmi.core` buildout installs the Sphinx scripts required to build
+the documentation, including testing its code snippets:
+
+.. code-block:: sh
+
+ $ cd docs
+ $ PATH=../bin:$PATH make doctest html
+ .../bin/sphinx-build -b doctest -d .../docs/_build/doctrees .../docs .../docs/_build/doctest
+ running tests...
+
+ Document: index
+ ---------------
+ 1 items passed all tests:
+ 17 tests in default
+ 17 tests in 1 items.
+ 17 passed and 0 failed.
+ Test passed.
+
+ Doctest summary
+ ===============
+ 17 tests
+ 0 failures in tests
+ 0 failures in setup code
+ build succeeded.
+ Testing of doctests in the sources finished, look at the results in .../docs/_build/doctest/output.txt.
+ .../bin/sphinx-build -b html -d .../docs/_build/doctrees .../docs .../docs/_build/html
+ ...
+ build succeeded.
+
+ Build finished. The HTML pages are in .../docs/_build/html.
+
+
+Submitting a Bug Report
+-----------------------
+
+:mod:`zmi.core` tracks its bugs on Launchpad:
+
+https://bugs.launchpad.net/zmi.core
+
+Please submit bug reports and feature requests there.
+
+
+Sharing Your Changes
+--------------------
+
+.. note::
+
+ Please ensure that all tests are passing before you submit your code.
+ If possible, your submission should include new tests for new features
+ or bug fixes, although it is possible that you may have tested your
+ new code by updating existing tests.
+
+If you got a read-only checkout from the Subversion repository, and you
+have made a change you would like to share, the best route is to let
+Subversion help you make a patch file:
+
+.. code-block:: sh
+
+ $ svn diff > zmi.core-cool_feature.patch
+
+You can then upload that patch file as an attachment to a Launchpad bug
+report.
+
+If you branched the code from Launchpad using Bazaar, you have another
+option: you can "push" your branch to Launchpad:
+
+.. code-block:: sh
+
+ $ bzr push lp:~tseaver/zmi.core/cool_feature
+
+After pushing your branch, you can link it to a bug report on Launchpad,
+or request that the maintainers merge your branch using the Launchpad
+"merge request" feature.
Added: Sandbox/jens/zmi.core/trunk/docs/index.rst
===================================================================
--- Sandbox/jens/zmi.core/trunk/docs/index.rst (rev 0)
+++ Sandbox/jens/zmi.core/trunk/docs/index.rst 2011-11-16 09:21:36 UTC (rev 123358)
@@ -0,0 +1,20 @@
+:mod:`zmi.core` Documentation
+==============================
+
+This package contains core ZMI components and views.
+
+Contents:
+
+.. toctree::
+ :maxdepth: 2
+
+ usage
+ api
+ hacking
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`modindex`
+* :ref:`search`
Added: Sandbox/jens/zmi.core/trunk/docs/make.bat
===================================================================
--- Sandbox/jens/zmi.core/trunk/docs/make.bat (rev 0)
+++ Sandbox/jens/zmi.core/trunk/docs/make.bat 2011-11-16 09:21:36 UTC (rev 123358)
@@ -0,0 +1,113 @@
+ at ECHO OFF
+
+REM Command file for Sphinx documentation
+
+set SPHINXBUILD=sphinx-build
+set BUILDDIR=_build
+set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
+if NOT "%PAPER%" == "" (
+ set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
+)
+
+if "%1" == "" goto help
+
+if "%1" == "help" (
+ :help
+ echo.Please use `make ^<target^>` where ^<target^> is one of
+ echo. html to make standalone HTML files
+ echo. dirhtml to make HTML files named index.html in directories
+ echo. pickle to make pickle files
+ echo. json to make JSON files
+ echo. htmlhelp to make HTML files and a HTML help project
+ echo. qthelp to make HTML files and a qthelp 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
+ echo. doctest to run all doctests embedded in the documentation if enabled
+ goto end
+)
+
+if "%1" == "clean" (
+ for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
+ del /q /s %BUILDDIR%\*
+ goto end
+)
+
+if "%1" == "html" (
+ %SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
+ echo.
+ echo.Build finished. The HTML pages are in %BUILDDIR%/html.
+ goto end
+)
+
+if "%1" == "dirhtml" (
+ %SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
+ echo.
+ echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
+ goto end
+)
+
+if "%1" == "pickle" (
+ %SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
+ echo.
+ echo.Build finished; now you can process the pickle files.
+ goto end
+)
+
+if "%1" == "json" (
+ %SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
+ echo.
+ echo.Build finished; now you can process the JSON files.
+ goto end
+)
+
+if "%1" == "htmlhelp" (
+ %SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
+ echo.
+ echo.Build finished; now you can run HTML Help Workshop with the ^
+.hhp project file in %BUILDDIR%/htmlhelp.
+ goto end
+)
+
+if "%1" == "qthelp" (
+ %SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
+ echo.
+ echo.Build finished; now you can run "qcollectiongenerator" with the ^
+.qhcp project file in %BUILDDIR%/qthelp, like this:
+ echo.^> qcollectiongenerator %BUILDDIR%\qthelp\zopeevent.qhcp
+ echo.To view the help file:
+ echo.^> assistant -collectionFile %BUILDDIR%\qthelp\zopeevent.ghc
+ goto end
+)
+
+if "%1" == "latex" (
+ %SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
+ echo.
+ echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
+ goto end
+)
+
+if "%1" == "changes" (
+ %SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
+ echo.
+ echo.The overview file is in %BUILDDIR%/changes.
+ goto end
+)
+
+if "%1" == "linkcheck" (
+ %SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
+ echo.
+ echo.Link check complete; look for any errors in the above output ^
+or in %BUILDDIR%/linkcheck/output.txt.
+ goto end
+)
+
+if "%1" == "doctest" (
+ %SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
+ echo.
+ echo.Testing of doctests in the sources finished, look at the ^
+results in %BUILDDIR%/doctest/output.txt.
+ goto end
+)
+
+:end
Added: Sandbox/jens/zmi.core/trunk/docs/usage.rst
===================================================================
--- Sandbox/jens/zmi.core/trunk/docs/usage.rst (rev 0)
+++ Sandbox/jens/zmi.core/trunk/docs/usage.rst 2011-11-16 09:21:36 UTC (rev 123358)
@@ -0,0 +1,4 @@
+Using :mod:`zmi.core`
+=======================
+
+
Added: Sandbox/jens/zmi.core/trunk/instance.cfg
===================================================================
--- Sandbox/jens/zmi.core/trunk/instance.cfg (rev 0)
+++ Sandbox/jens/zmi.core/trunk/instance.cfg 2011-11-16 09:21:36 UTC (rev 123358)
@@ -0,0 +1,38 @@
+[buildout]
+extends =
+ http://svn.zope.org/repos/main/zopetoolkit/trunk/zopeapp-sources.cfg
+ http://svn.zope.org/repos/main/Zope/trunk/sources.cfg
+develop =
+ .
+ src/Zope2
+parts =
+ test
+ scripts
+ zopepy
+ instance
+eggs = zmi.core
+
+[test]
+recipe = zc.recipe.testrunner
+eggs = ${buildout:eggs}
+
+[scripts]
+recipe = z3c.recipe.scripts
+eggs =
+ ${buildout:eggs}
+ Zope2
+
+[zopepy]
+recipe = z3c.recipe.scripts
+eggs = ${buildout:eggs}
+interpreter = zopepy
+scripts = zopepy
+
+[instance]
+recipe = plone.recipe.zope2instance
+eggs = ${buildout:eggs}
+zcml = ${buildout:eggs}
+user = admin:admon
+debug-mode = on
+verbose-security = on
+http-address = 127.0.0.1:8080
Added: Sandbox/jens/zmi.core/trunk/setup.py
===================================================================
--- Sandbox/jens/zmi.core/trunk/setup.py (rev 0)
+++ Sandbox/jens/zmi.core/trunk/setup.py 2011-11-16 09:21:36 UTC (rev 123358)
@@ -0,0 +1,61 @@
+##############################################################################
+#
+# 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.
+#
+##############################################################################
+# This package is developed by the Zope Toolkit project, documented here:
+# http://docs.zope.org/zopetoolkit
+# When developing and releasing this package, please follow the documented
+# Zope Toolkit policies as described by this documentation.
+##############################################################################
+"""Setup for zmi.core package
+"""
+
+import os
+import sys
+from setuptools import setup, find_packages
+
+def read(*rnames):
+ return open(os.path.join(os.path.dirname(__file__), *rnames)).read()
+
+setup(
+ name='zmi.core',
+ version=read('VERSION.txt').strip(),
+ url='http://pypi.python.org/pypi/zmi.core',
+ license='ZPL 2.1',
+ description='Zope ZMI core components and views',
+ author='Zope Foundation and Contributors',
+ author_email='zope-dev at zope.org',
+ long_description=(
+ read('README.txt')
+ + '\n' +
+ read('CHANGES.txt')
+ ),
+ classifiers=[
+ "Development Status :: 3 - Alpha",
+ "Intended Audience :: Developers",
+ "License :: OSI Approved :: Zope Public License",
+ "Operating System :: OS Independent",
+ "Programming Language :: Python :: 2.6",
+ "Programming Language :: Python :: 2.7",
+ "Topic :: Software Development :: Libraries :: Python Modules",
+ ],
+ packages=find_packages('src'),
+ package_dir={'': 'src'},
+ namespace_packages=['zmi',],
+ include_package_data=True,
+ install_requires=[
+ 'setuptools',
+ 'Zope2'
+ ],
+ zip_safe=False,
+ test_suite='zmi.core.tests.test_suite',
+ )
Property changes on: Sandbox/jens/zmi.core/trunk/setup.py
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: Sandbox/jens/zmi.core/trunk/src/zmi/__init__.py
===================================================================
--- Sandbox/jens/zmi.core/trunk/src/zmi/__init__.py (rev 0)
+++ Sandbox/jens/zmi.core/trunk/src/zmi/__init__.py 2011-11-16 09:21:36 UTC (rev 123358)
@@ -0,0 +1 @@
+__import__('pkg_resources').declare_namespace(__name__)
Property changes on: Sandbox/jens/zmi.core/trunk/src/zmi/__init__.py
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: Sandbox/jens/zmi.core/trunk/src/zmi/core/__init__.py
===================================================================
--- Sandbox/jens/zmi.core/trunk/src/zmi/core/__init__.py (rev 0)
+++ Sandbox/jens/zmi.core/trunk/src/zmi/core/__init__.py 2011-11-16 09:21:36 UTC (rev 123358)
@@ -0,0 +1,16 @@
+##############################################################################
+#
+# Copyright (c) 2011 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.
+#
+##############################################################################
+""" Zope ZMI core components and views
+"""
+
Property changes on: Sandbox/jens/zmi.core/trunk/src/zmi/core/__init__.py
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/__init__.py
===================================================================
--- Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/__init__.py (rev 0)
+++ Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/__init__.py 2011-11-16 09:21:36 UTC (rev 123358)
@@ -0,0 +1 @@
+# package
Property changes on: Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/__init__.py
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/base.py
===================================================================
--- Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/base.py (rev 0)
+++ Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/base.py 2011-11-16 09:21:36 UTC (rev 123358)
@@ -0,0 +1,34 @@
+##############################################################################
+#
+# Copyright (c) 2011 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.
+#
+##############################################################################
+""" Base view for ZMI views
+"""
+
+from ZTUtils import make_query
+
+class ZMIView(object):
+ """ ZMI base view
+ """
+
+ def __init__(self, context, request):
+ self.context = context
+ self.request = request
+
+
+ def redirect(self, url, status=''):
+ """ Redirect to a url and provide an optional status message
+ """
+ if status:
+ url = '%s%s' % (url, make_query(zmi_status=status))
+ self.request.response.redirect(url)
+
Property changes on: Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/base.py
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/configure.zcml
===================================================================
--- Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/configure.zcml (rev 0)
+++ Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/configure.zcml 2011-11-16 09:21:36 UTC (rev 123358)
@@ -0,0 +1,12 @@
+<configure xmlns="http://namespaces.zope.org/zope"
+ xmlns:browser="http://namespaces.zope.org/browser">
+
+ <browser:page
+ for="*"
+ name="zmi_interfaces"
+ template="templates/zmi_interfaces.pt"
+ class="zmi.core.browser.zmi_interfaces.InterfacesView"
+ permission="zope2.ManageProperties"
+ />
+
+</configure>
Added: Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/templates/zmi_interfaces.pt
===================================================================
--- Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/templates/zmi_interfaces.pt (rev 0)
+++ Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/templates/zmi_interfaces.pt 2011-11-16 09:21:36 UTC (rev 123358)
@@ -0,0 +1,27 @@
+<html metal:use-macro="context/@@standard_macros/page">
+<body>
+
+<metal:slot metal:fill-slot="body">
+<metal:macro metal:define-macro="heading">
+<h1 i18n:translate="heading_edit_marker">Show Interfaces</h1>
+</metal:macro>
+<metal:macro metal:define-macro="main">
+<p class="form-help formHelp" i18n:translate="">
+ This view shows all interfaces provided by
+ <b tal:content="string:${context/meta_type|string:unknown} at ${context/absolute_url_path}">Foo at /root/foo_instance</b>
+</p>
+
+<fieldset>
+ <legend i18n:translate="legend_provided">Provided Interfaces</legend>
+ <tal:loop tal:repeat="interface view/getInterfaceNames">
+
+ <label class="form-mono"
+ tal:content="interface/name" i18n:translate="">INTERFACE</label><br />
+ </tal:loop>
+</fieldset>
+
+</metal:macro>
+</metal:slot>
+
+</body>
+</html>
Added: Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/zmi_interfaces.py
===================================================================
--- Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/zmi_interfaces.py (rev 0)
+++ Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/zmi_interfaces.py 2011-11-16 09:21:36 UTC (rev 123358)
@@ -0,0 +1,44 @@
+##############################################################################
+#
+# Copyright (c) 2011 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.
+#
+##############################################################################
+"""Marker interfaces adapter views.
+"""
+
+from Products.Five.utilities.interfaces import IMarkerInterfaces
+from zmi.core.browser.base import ZMIView
+
+
+class InterfacesView(ZMIView):
+ """Marker interface view.
+ """
+
+ def __init__(self, context, request):
+ super(InterfacesView, self).__init__(context, request)
+ self.adapted = IMarkerInterfaces(context)
+ self.context_url = self.context.absolute_url()
+
+ def __call__(self):
+ return self.index()
+
+ def _getLinkToInterfaceDetailsView(self, interfaceName):
+ return (self.context_url +
+ '/views-details.html?iface=%s&type=zope.publisher.interfaces.browser.IBrowserRequest' % interfaceName)
+
+ def _getNameLinkDicts(self, interfaceNames):
+ return [dict(name=name,
+ link=self._getLinkToInterfaceDetailsView(name))
+ for name in interfaceNames]
+
+ def getInterfaceNames(self):
+ return self._getNameLinkDicts(self.adapted.getInterfaceNames())
+
Property changes on: Sandbox/jens/zmi.core/trunk/src/zmi/core/browser/zmi_interfaces.py
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
Added: Sandbox/jens/zmi.core/trunk/src/zmi/core/configure.zcml
===================================================================
--- Sandbox/jens/zmi.core/trunk/src/zmi/core/configure.zcml (rev 0)
+++ Sandbox/jens/zmi.core/trunk/src/zmi/core/configure.zcml 2011-11-16 09:21:36 UTC (rev 123358)
@@ -0,0 +1,8 @@
+<configure xmlns="http://namespaces.zope.org/zope"
+ xmlns:five="http://namespaces.zope.org/five">
+
+ <five:registerPackage package="." />
+
+ <include package=".browser"/>
+
+</configure>
Added: Sandbox/jens/zmi.core/trunk/src/zmi/core/tests.py
===================================================================
--- Sandbox/jens/zmi.core/trunk/src/zmi/core/tests.py (rev 0)
+++ Sandbox/jens/zmi.core/trunk/src/zmi/core/tests.py 2011-11-16 09:21:36 UTC (rev 123358)
@@ -0,0 +1,28 @@
+##############################################################################
+#
+# Copyright (c) 2011 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.
+#
+##############################################################################
+import unittest
+
+class CoreTests(unittest.TestCase):
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+
+def test_suite():
+ return unittest.TestSuite((
+ unittest.makeSuite(CoreTests),
+ ))
Property changes on: Sandbox/jens/zmi.core/trunk/src/zmi/core/tests.py
___________________________________________________________________
Added: svn:keywords
+ Id
Added: svn:eol-style
+ native
More information about the checkins
mailing list