[Zope3-checkins] SVN: Zope3/branches/roger-contentprovider/src/zope/portlet/ Initial import

Helmut Merz helmutm at cy55.de
Sat Oct 8 05:10:08 EDT 2005


Log message for revision 38920:
  Initial import

Changed:
  A   Zope3/branches/roger-contentprovider/src/zope/portlet/
  A   Zope3/branches/roger-contentprovider/src/zope/portlet/DEPENDENCIES.cfg
  A   Zope3/branches/roger-contentprovider/src/zope/portlet/README.txt
  A   Zope3/branches/roger-contentprovider/src/zope/portlet/SETUP.cfg
  A   Zope3/branches/roger-contentprovider/src/zope/portlet/__init__.py
  A   Zope3/branches/roger-contentprovider/src/zope/portlet/interfaces.py
  A   Zope3/branches/roger-contentprovider/src/zope/portlet/portlet.py
  A   Zope3/branches/roger-contentprovider/src/zope/portlet/tests/
  A   Zope3/branches/roger-contentprovider/src/zope/portlet/tests/__init__.py
  A   Zope3/branches/roger-contentprovider/src/zope/portlet/tests/test_doc.py

-=-
Added: Zope3/branches/roger-contentprovider/src/zope/portlet/DEPENDENCIES.cfg
===================================================================
--- Zope3/branches/roger-contentprovider/src/zope/portlet/DEPENDENCIES.cfg	2005-10-08 08:27:58 UTC (rev 38919)
+++ Zope3/branches/roger-contentprovider/src/zope/portlet/DEPENDENCIES.cfg	2005-10-08 09:10:07 UTC (rev 38920)
@@ -0,0 +1,10 @@
+zope.app
+zope.component
+zope.configuration
+zope.interface
+zope.publisher
+zope.schema
+zope.security
+zope.tales
+zope.contentprovider
+zope.viewlet
\ No newline at end of file


Property changes on: Zope3/branches/roger-contentprovider/src/zope/portlet/DEPENDENCIES.cfg
___________________________________________________________________
Name: svn:keywords
   + Id

Added: Zope3/branches/roger-contentprovider/src/zope/portlet/README.txt
===================================================================
--- Zope3/branches/roger-contentprovider/src/zope/portlet/README.txt	2005-10-08 08:27:58 UTC (rev 38919)
+++ Zope3/branches/roger-contentprovider/src/zope/portlet/README.txt	2005-10-08 09:10:07 UTC (rev 38920)
@@ -0,0 +1,39 @@
+========
+Portlets
+========
+
+Portlets...
+
+
+Getting Started
+---------------
+
+
+Portlet
+~~~~~~~
+
+  >>> import os, tempfile
+  >>> temp_dir = tempfile.mkdtemp()
+
+  >>> portletFileName = os.path.join(temp_dir, 'portlet.pt')
+  >>> open(portletFileName, 'w').write('''
+  ...         <div class="box">
+  ...           <tal:block replace="portlet/title" />
+  ...         </div>
+  ... ''')
+
+  >>> class POrtletBase(object):
+  ...     def title(self):
+  ...         return 'Portlet Title'
+
+
+Portlet Managers
+~~~~~~~~~~~~~~~~
+
+
+Cleanup
+-------
+
+  >>> import shutil
+  >>> shutil.rmtree(temp_dir)
+


Property changes on: Zope3/branches/roger-contentprovider/src/zope/portlet/README.txt
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: Zope3/branches/roger-contentprovider/src/zope/portlet/SETUP.cfg
===================================================================
--- Zope3/branches/roger-contentprovider/src/zope/portlet/SETUP.cfg	2005-10-08 08:27:58 UTC (rev 38919)
+++ Zope3/branches/roger-contentprovider/src/zope/portlet/SETUP.cfg	2005-10-08 09:10:07 UTC (rev 38920)
@@ -0,0 +1,5 @@
+# Tell zpkg how to install the ZCML slugs.
+
+<data-files zopeskel/etc/package-includes>
+  zope.portlet-*.zcml
+</data-files>


Property changes on: Zope3/branches/roger-contentprovider/src/zope/portlet/SETUP.cfg
___________________________________________________________________
Name: svn:keywords
   + Id

Added: Zope3/branches/roger-contentprovider/src/zope/portlet/__init__.py
===================================================================
--- Zope3/branches/roger-contentprovider/src/zope/portlet/__init__.py	2005-10-08 08:27:58 UTC (rev 38919)
+++ Zope3/branches/roger-contentprovider/src/zope/portlet/__init__.py	2005-10-08 09:10:07 UTC (rev 38920)
@@ -0,0 +1,17 @@
+##############################################################################
+#
+# Copyright (c) 2004 Zope Corporation 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.
+#
+##############################################################################
+"""Viewlet exceptions
+
+$Id$
+"""


Property changes on: Zope3/branches/roger-contentprovider/src/zope/portlet/__init__.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: Zope3/branches/roger-contentprovider/src/zope/portlet/interfaces.py
===================================================================
--- Zope3/branches/roger-contentprovider/src/zope/portlet/interfaces.py	2005-10-08 08:27:58 UTC (rev 38919)
+++ Zope3/branches/roger-contentprovider/src/zope/portlet/interfaces.py	2005-10-08 09:10:07 UTC (rev 38920)
@@ -0,0 +1,33 @@
+##############################################################################
+#
+# Copyright (c) 2004 Zope Corporation 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.
+#
+##############################################################################
+"""Portlet interfaces
+
+$Id$
+"""
+__docformat__ = 'restructuredtext'
+
+import zope.component
+import zope.interface
+import zope.schema
+import zope.viewlet.interfaces
+
+
+class IPortlet(zope.viewlet.interfaces.IViewlet):
+    """A Portlet is a viewlet whose state and corresponding appearance
+       may be be changed on user interaction.
+    """
+
+class IPortletManager(zope.interface.Interface):
+    """A portlet manager provides one or more portlets.
+    """


Property changes on: Zope3/branches/roger-contentprovider/src/zope/portlet/interfaces.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: Zope3/branches/roger-contentprovider/src/zope/portlet/portlet.py
===================================================================
--- Zope3/branches/roger-contentprovider/src/zope/portlet/portlet.py	2005-10-08 08:27:58 UTC (rev 38919)
+++ Zope3/branches/roger-contentprovider/src/zope/portlet/portlet.py	2005-10-08 09:10:07 UTC (rev 38920)
@@ -0,0 +1,25 @@
+##############################################################################
+#
+# Copyright (c) 2004 Zope Corporation 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.
+#
+##############################################################################
+"""Portlet implementation
+
+$Id$
+"""
+__docformat__ = 'restructuredtext'
+
+from zope.viewlet.viewlet import ViewletManager
+
+
+class PortletManager(ViewletManager):
+    """Portlet manager."""
+


Property changes on: Zope3/branches/roger-contentprovider/src/zope/portlet/portlet.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: Zope3/branches/roger-contentprovider/src/zope/portlet/tests/__init__.py
===================================================================
--- Zope3/branches/roger-contentprovider/src/zope/portlet/tests/__init__.py	2005-10-08 08:27:58 UTC (rev 38919)
+++ Zope3/branches/roger-contentprovider/src/zope/portlet/tests/__init__.py	2005-10-08 09:10:07 UTC (rev 38920)
@@ -0,0 +1,17 @@
+##############################################################################
+#
+# Copyright (c) 2004 Zope Corporation 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.
+#
+##############################################################################
+"""Viewlet exceptions
+
+$Id$
+"""


Property changes on: Zope3/branches/roger-contentprovider/src/zope/portlet/tests/__init__.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native

Added: Zope3/branches/roger-contentprovider/src/zope/portlet/tests/test_doc.py
===================================================================
--- Zope3/branches/roger-contentprovider/src/zope/portlet/tests/test_doc.py	2005-10-08 08:27:58 UTC (rev 38919)
+++ Zope3/branches/roger-contentprovider/src/zope/portlet/tests/test_doc.py	2005-10-08 09:10:07 UTC (rev 38920)
@@ -0,0 +1,60 @@
+##############################################################################
+#
+# Copyright (c) 2004 Zope Corporation 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.
+#
+##############################################################################
+"""Viewlet tests
+
+$Id$
+"""
+__docformat__ = 'restructuredtext'
+
+import unittest
+import zope.interface
+import zope.security
+from zope.testing import doctest
+from zope.testing.doctestunit import DocTestSuite, DocFileSuite
+from zope.app.testing import setup
+
+
+class TestParticipation(object):
+    principal = 'foobar'
+    interaction = None
+
+
+def setUp(test):
+    setup.placefulSetUp()
+
+    from zope.app.pagetemplate import metaconfigure
+    from zope.contentprovider import tales
+    metaconfigure.registerType('provider', tales.TALESProviderExpression)
+
+    zope.security.management.getInteraction().add(TestParticipation())
+
+
+def tearDown(test):
+    setup.placefulTearDown()
+
+
+def test_suite():
+    return unittest.TestSuite((
+        DocFileSuite('../README.txt',
+                     setUp=setUp, tearDown=tearDown,
+                     optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS,
+                     ),
+#         DocFileSuite('../directives.txt',
+#                      setUp=setUp, tearDown=tearDown,
+#                      optionflags=doctest.NORMALIZE_WHITESPACE|doctest.ELLIPSIS,
+#                      ),
+        ))
+
+if __name__ == '__main__':
+    unittest.main(defaultTest='test_suite')


Property changes on: Zope3/branches/roger-contentprovider/src/zope/portlet/tests/test_doc.py
___________________________________________________________________
Name: svn:keywords
   + Id
Name: svn:eol-style
   + native



More information about the Zope3-Checkins mailing list