[Checkins] SVN: five.grok/trunk/ Add optional support for grokcore.layout to five.grok.
Sylvain Viollow
cvs-admin at zope.org
Mon Jun 18 09:43:14 UTC 2012
Log message for revision 126910:
Add optional support for grokcore.layout to five.grok.
Changed:
U five.grok/trunk/README.txt
U five.grok/trunk/buildout.cfg
U five.grok/trunk/docs/HISTORY.txt
U five.grok/trunk/setup.py
U five.grok/trunk/src/five/grok/__init__.py
U five.grok/trunk/src/five/grok/configure.zcml
U five.grok/trunk/src/five/grok/interfaces.py
U five.grok/trunk/src/five/grok/meta.py
-=-
Modified: five.grok/trunk/README.txt
===================================================================
--- five.grok/trunk/README.txt 2012-06-18 08:36:41 UTC (rev 126909)
+++ five.grok/trunk/README.txt 2012-06-18 09:43:06 UTC (rev 126910)
@@ -31,12 +31,14 @@
- Page Templates (using the Zope 2 Page Templates),
-- Formlib forms,
+- Formlib forms (optional, you need to include the extra ``form``),
- Local sites and local utilities,
-- Annotations.
+- Annotations,
+- Layout (optional, you need to include the extra ``layout``).
+
All those components are available with exactly the same syntax than
in grok. You just have to do::
@@ -60,15 +62,16 @@
And for this release we recommend to pin down the following version in
your buildout::
+ five.formlib = 1.0.4
+ five.localsitemanager = 2.0.5
grokcore.annotation = 1.3
grokcore.component = 2.5
grokcore.formlib = 1.9
+ grokcore.layout = 1.5.1
grokcore.security = 1.6.1
grokcore.site = 1.6.1
grokcore.view = 2.7
grokcore.viewlet = 1.10.1
- five.localsitemanager = 2.0.5
- five.formlib = 1.0.4
martian = 0.14
Modified: five.grok/trunk/buildout.cfg
===================================================================
--- five.grok/trunk/buildout.cfg 2012-06-18 08:36:41 UTC (rev 126909)
+++ five.grok/trunk/buildout.cfg 2012-06-18 09:43:06 UTC (rev 126910)
@@ -10,17 +10,18 @@
versions = versions
[versions]
-plone.recipe.zope2instance =
+five.formlib = 1.0.4
+five.localsitemanager = 2.0.5
grokcore.annotation = 1.3
grokcore.component = 2.5
grokcore.formlib = 1.9
+grokcore.layout = 1.5.1
grokcore.security = 1.6.1
grokcore.site = 1.6.1
grokcore.view = 2.7
grokcore.viewlet = 1.10.1
-five.localsitemanager = 2.0.5
-five.formlib = 1.0.4
martian = 0.14
+plone.recipe.zope2instance =
# This is needed in order to set up the mkzopeinstance script
[zope2]
Modified: five.grok/trunk/docs/HISTORY.txt
===================================================================
--- five.grok/trunk/docs/HISTORY.txt 2012-06-18 08:36:41 UTC (rev 126909)
+++ five.grok/trunk/docs/HISTORY.txt 2012-06-18 09:43:06 UTC (rev 126910)
@@ -1,10 +1,10 @@
Changelog
=========
-1.4.0 (unreleased)
+1.3.2 (unreleased)
------------------
-- ...
+- Add an optional support for ``grokcore.layout``.
1.3.1 (2012-05-02)
------------------
Modified: five.grok/trunk/setup.py
===================================================================
--- five.grok/trunk/setup.py 2012-06-18 08:36:41 UTC (rev 126909)
+++ five.grok/trunk/setup.py 2012-06-18 09:43:06 UTC (rev 126910)
@@ -8,8 +8,11 @@
'five.formlib',
'zope.formlib',
]
-test_requires = form_requires + [
+layout_requires = [
+ 'grokcore.layout',
]
+test_requires = form_requires + layout_requires + [
+ ]
setup(name='five.grok',
version=version,
@@ -57,5 +60,6 @@
],
extras_require={
'form': form_requires,
+ 'layout': layout_requires,
'test': form_requires},
)
Modified: five.grok/trunk/src/five/grok/__init__.py
===================================================================
--- five.grok/trunk/src/five/grok/__init__.py 2012-06-18 08:36:41 UTC (rev 126909)
+++ five.grok/trunk/src/five/grok/__init__.py 2012-06-18 09:43:06 UTC (rev 126910)
@@ -31,11 +31,13 @@
from five.grok.components import ZopeTwoDirectoryResource as DirectoryResource
# Only export public API
-from five.grok.interfaces import IFiveGrokAPI, HAVE_FORMLIB
+from five.grok.interfaces import IFiveGrokAPI, HAVE_FORMLIB, HAVE_LAYOUT
if HAVE_FORMLIB:
from grokcore.formlib import *
from five.grok.components import Form, AddForm
from five.grok.components import EditForm, DisplayForm
from five.grok.formlib import AutoFields
+if HAVE_LAYOUT:
+ from grokcore.layout import *
__all__ = list(IFiveGrokAPI)
Modified: five.grok/trunk/src/five/grok/configure.zcml
===================================================================
--- five.grok/trunk/src/five/grok/configure.zcml 2012-06-18 08:36:41 UTC (rev 126909)
+++ five.grok/trunk/src/five/grok/configure.zcml 2012-06-18 09:43:06 UTC (rev 126910)
@@ -17,6 +17,8 @@
<include package="grokcore.annotation" />
<include package="grokcore.view" />
<include package="grokcore.viewlet" />
+ <include package="grokcore.layout"
+ zcml:condition="installed grokcore.layout" />
<grok:grok package=".subscribers" />
<grok:grok package=".absoluteurl" />
Modified: five.grok/trunk/src/five/grok/interfaces.py
===================================================================
--- five.grok/trunk/src/five/grok/interfaces.py 2012-06-18 08:36:41 UTC (rev 126909)
+++ five.grok/trunk/src/five/grok/interfaces.py 2012-06-18 09:43:06 UTC (rev 126910)
@@ -31,6 +31,8 @@
HAVE_FORMLIB, IGrokcoreFormlibAPI = api(
'grokcore.formlib.interfaces.IGrokcoreFormlibAPI')
+HAVE_LAYOUT, IGrokcoreLayoutAPI = api(
+ 'grokcore.layout.interfaces.IGrokcoreLayoutAPI')
class IFiveGrokView(grokcore.view.interfaces.IGrokView):
@@ -45,6 +47,7 @@
grokcore.site.interfaces.IGrokcoreSiteAPI,
grokcore.view.interfaces.IGrokcoreViewAPI,
grokcore.viewlet.interfaces.IGrokcoreViewletAPI,
- IGrokcoreFormlibAPI):
+ IGrokcoreFormlibAPI,
+ IGrokcoreLayoutAPI):
"""Official five.grok API.
"""
Modified: five.grok/trunk/src/five/grok/meta.py
===================================================================
--- five.grok/trunk/src/five/grok/meta.py 2012-06-18 08:36:41 UTC (rev 126909)
+++ five.grok/trunk/src/five/grok/meta.py 2012-06-18 09:43:06 UTC (rev 126910)
@@ -12,7 +12,7 @@
#
##############################################################################
-from five.grok import components
+from five.grok import components, interfaces
from grokcore.view.meta.directoryresource import _get_resource_path
from zope import interface
from zope.publisher.interfaces.browser import IDefaultBrowserLayer
@@ -27,7 +27,7 @@
from App.class_init import InitializeClass as initializeClass
-if components.HAVE_FORMLIB:
+if interfaces.HAVE_FORMLIB:
from five.grok import formlib
class FormGrokker(martian.ClassGrokker):
@@ -67,6 +67,13 @@
return True
+if interfaces.HAVE_LAYOUT:
+ import grokcore.layout
+
+ class PageSecurityGrokker(ViewSecurityGrokker):
+ martian.component(grokcore.layout.Page)
+
+
def _register_resource(config, resource_path, name, layer):
resource_factory = components.ZopeTwoDirectoryResourceFactory(
name, resource_path)
More information about the checkins
mailing list