[Checkins] SVN: grokcore.site/trunk/ Improve README, export Grokcore.component API with it.

Sylvain Viollon sylvain at infrae.com
Thu Jun 11 03:54:07 EDT 2009


Log message for revision 100846:
  Improve README, export Grokcore.component API with it.
  
  

Changed:
  U   grokcore.site/trunk/README.txt
  U   grokcore.site/trunk/src/grokcore/site/interfaces.py

-=-
Modified: grokcore.site/trunk/README.txt
===================================================================
--- grokcore.site/trunk/README.txt	2009-06-11 07:49:36 UTC (rev 100845)
+++ grokcore.site/trunk/README.txt	2009-06-11 07:54:07 UTC (rev 100846)
@@ -12,7 +12,7 @@
 package, please refer to its documentation for details.  The only
 additional ZCML line you will need is::
 
-  <include package="grokcore.site" file="meta.zcml" />
+  <include package="grokcore.site" />
 
 Put this somewhere near the top of your root ZCML file but below the
 line where you include ``grokcore.component``'s configuration.
@@ -73,9 +73,33 @@
 
 ``local_utility(factory, provides=None, name=u'', setup=None, public=False, name_in_container=None``)
    Directive used on a site to register a local utility at the
-   creation time.
+   creation time:
 
+   ``factory``
+      Would be the component to register (required parameter),
 
+   ``provides``
+      Would be the interface used to query the local utility (required
+      parameter),
+
+   ``name``
+      Would be the name used to query the local utility,
+
+   ``setup``
+      Would be a function taking parameter. If defined it will be
+      called after the utility is created with it as first and unique
+      parameter.
+
+   ``public``
+      If true, the utility will be created in the site container
+      itself, not in the site manager, and public will be able to
+      access it directly.
+
+   ``name_in_container``
+      Would be used as id for the utility in container itwill be
+      created. If not defined it will ask NameChooser to pick a name
+      for it.
+
 In addition, the ``grokcore.security`` package exposes the
 `grokcore.component`_ API.
 

Modified: grokcore.site/trunk/src/grokcore/site/interfaces.py
===================================================================
--- grokcore.site/trunk/src/grokcore/site/interfaces.py	2009-06-11 07:49:36 UTC (rev 100845)
+++ grokcore.site/trunk/src/grokcore/site/interfaces.py	2009-06-11 07:54:07 UTC (rev 100846)
@@ -13,8 +13,8 @@
 ##############################################################################
 
 from zope.interface import Interface, Attribute
+from grokcore.component.interfaces import IGrokcoreComponentAPI
 
-
 class IUtilityInstaller(Interface):
     """This install an utility in a site. Let you have different
     'installation' method if you want (one for Zope2 / Zope3).
@@ -52,6 +52,6 @@
         looked up."""
 
 
-class IGrokcoreSiteAPI(IBaseClasses, IDirectives):
+class IGrokcoreSiteAPI(IGrokcoreComponentAPI, IBaseClasses, IDirectives):
     """grokcore.site's public API."""
 



More information about the Checkins mailing list