Skip to content

Commit

Permalink
Improve README, export Grokcore.component API with it.
Browse files Browse the repository at this point in the history
  • Loading branch information
thefunny42 committed Jun 11, 2009
1 parent 5b13257 commit 7dddde5
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 4 deletions.
28 changes: 26 additions & 2 deletions README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ This package is essentially set up like the `grokcore.component`_
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.
Expand Down Expand Up @@ -73,8 +73,32 @@ Directives

``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.
Expand Down
4 changes: 2 additions & 2 deletions src/grokcore/site/interfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
##############################################################################

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
Expand Down Expand Up @@ -52,6 +52,6 @@ def provides(interface):
looked up."""


class IGrokcoreSiteAPI(IBaseClasses, IDirectives):
class IGrokcoreSiteAPI(IGrokcoreComponentAPI, IBaseClasses, IDirectives):
"""grokcore.site's public API."""

0 comments on commit 7dddde5

Please sign in to comment.