[Checkins] SVN: grokcore.viewlet/trunk/ Move the view directive to grokcore.view.
Sylvain Viollon
sylvain at infrae.com
Mon Nov 1 11:42:21 EDT 2010
Log message for revision 118054:
Move the view directive to grokcore.view.
Changed:
U grokcore.viewlet/trunk/CHANGES.txt
U grokcore.viewlet/trunk/src/grokcore/viewlet/__init__.py
U grokcore.viewlet/trunk/src/grokcore/viewlet/directive.py
U grokcore.viewlet/trunk/src/grokcore/viewlet/ftests/test_grok_functional.py
U grokcore.viewlet/trunk/src/grokcore/viewlet/interfaces.py
U grokcore.viewlet/trunk/src/grokcore/viewlet/tests/test_grok.py
-=-
Modified: grokcore.viewlet/trunk/CHANGES.txt
===================================================================
--- grokcore.viewlet/trunk/CHANGES.txt 2010-11-01 15:38:34 UTC (rev 118053)
+++ grokcore.viewlet/trunk/CHANGES.txt 2010-11-01 15:42:21 UTC (rev 118054)
@@ -6,7 +6,9 @@
* Move the order directive to grokcore.component.
+* Move the view directive to grokcore.view.
+
1.5 (2010-10-18)
----------------
Modified: grokcore.viewlet/trunk/src/grokcore/viewlet/__init__.py
===================================================================
--- grokcore.viewlet/trunk/src/grokcore/viewlet/__init__.py 2010-11-01 15:38:34 UTC (rev 118053)
+++ grokcore.viewlet/trunk/src/grokcore/viewlet/__init__.py 2010-11-01 15:42:21 UTC (rev 118054)
@@ -18,7 +18,7 @@
from grokcore.view import *
from grokcore.viewlet.components import Viewlet, ViewletManager
-from grokcore.viewlet.directive import view, viewletmanager
+from grokcore.viewlet.directive import viewletmanager
# Import this module so that it's available as soon as you import the
# 'grokcore.view' package. Useful for tests and interpreter examples.
Modified: grokcore.viewlet/trunk/src/grokcore/viewlet/directive.py
===================================================================
--- grokcore.viewlet/trunk/src/grokcore/viewlet/directive.py 2010-11-01 15:38:34 UTC (rev 118053)
+++ grokcore.viewlet/trunk/src/grokcore/viewlet/directive.py 2010-11-01 15:42:21 UTC (rev 118054)
@@ -16,20 +16,11 @@
import martian
from grokcore.component.scan import UnambiguousComponentScope
-from zope.publisher.interfaces.browser import IBrowserView
-class OneInterfaceOrClassOnClassOrModule(martian.Directive):
- """Convenience base class. Not for public use."""
- scope = martian.CLASS_OR_MODULE
+class viewletmanager(martian.Directive):
+ scope = UnambiguousComponentScope('viewletmanager')
store = martian.ONCE
validate = martian.validateInterfaceOrClass
-class viewletmanager(OneInterfaceOrClassOnClassOrModule):
- scope = UnambiguousComponentScope('viewletmanager')
-
-
-class view(OneInterfaceOrClassOnClassOrModule):
- default = IBrowserView
-
Modified: grokcore.viewlet/trunk/src/grokcore/viewlet/ftests/test_grok_functional.py
===================================================================
--- grokcore.viewlet/trunk/src/grokcore/viewlet/ftests/test_grok_functional.py 2010-11-01 15:38:34 UTC (rev 118053)
+++ grokcore.viewlet/trunk/src/grokcore/viewlet/ftests/test_grok_functional.py 2010-11-01 15:42:21 UTC (rev 118054)
@@ -1,9 +1,24 @@
+##############################################################################
+#
+# Copyright (c) 2006-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.
+#
+##############################################################################
+
import re
import unittest
+import doctest
import grokcore.viewlet
from pkg_resources import resource_listdir
-from zope.testing import doctest, renormalizing
+from zope.testing import renormalizing
from zope.app.wsgi.testlayer import BrowserLayer
FunctionalLayer = BrowserLayer(grokcore.viewlet)
Modified: grokcore.viewlet/trunk/src/grokcore/viewlet/interfaces.py
===================================================================
--- grokcore.viewlet/trunk/src/grokcore/viewlet/interfaces.py 2010-11-01 15:38:34 UTC (rev 118053)
+++ grokcore.viewlet/trunk/src/grokcore/viewlet/interfaces.py 2010-11-01 15:42:21 UTC (rev 118054)
@@ -33,10 +33,6 @@
grokcore.security.interfaces.IDirectives,
grokcore.view.interfaces.IDirectives):
- def view(view):
- """Define on which view a viewlet manager/viewlet is registered.
- """
-
def viewletmanager(manager):
"""Define on which viewlet manager a viewlet is registered.
"""
Modified: grokcore.viewlet/trunk/src/grokcore/viewlet/tests/test_grok.py
===================================================================
--- grokcore.viewlet/trunk/src/grokcore/viewlet/tests/test_grok.py 2010-11-01 15:38:34 UTC (rev 118053)
+++ grokcore.viewlet/trunk/src/grokcore/viewlet/tests/test_grok.py 2010-11-01 15:42:21 UTC (rev 118054)
@@ -1,7 +1,22 @@
+##############################################################################
+#
+# Copyright (c) 2006-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.
+#
+##############################################################################
+
import re
import unittest
+import doctest
from pkg_resources import resource_listdir
-from zope.testing import doctest, cleanup, renormalizing
+from zope.testing import cleanup, renormalizing
import zope.component.eventtesting
def setUpZope(test):
More information about the checkins
mailing list