Skip to content

Commit

Permalink
Change directive name to 'jbot'.
Browse files Browse the repository at this point in the history
  • Loading branch information
malthe committed Oct 31, 2009
1 parent e64a875 commit 21f666c
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 7 deletions.
4 changes: 4 additions & 0 deletions CHANGES.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
Changes
=======

In next release...

- ZCML-directive is now called ``jbot``. [malthe]

0.5.2 (2009-10-23)
------------------

Expand Down
2 changes: 1 addition & 1 deletion README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ use with jbot using a ZCML-directive::

<include package="z3c.jbot" file="meta.zcml" />

<browser:templateOverrides
<browser:jbot
directory="<path>"
layer="<layer>" />

Expand Down
4 changes: 2 additions & 2 deletions z3c/jbot/README.txt
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ Let's try registering the directory again.

>>> xmlconfig.xmlconfig(StringIO("""
... <configure xmlns="http://namespaces.zope.org/browser">
... <templateOverrides directory="%s/overrides/interface" />
... <jbot directory="%s/overrides/interface" />
... </configure>
... """ % directory))

Expand Down Expand Up @@ -204,7 +204,7 @@ Let's register overrides for the HTTP-request layer.

>>> xmlconfig.xmlconfig(StringIO("""
... <configure xmlns="http://namespaces.zope.org/browser">
... <templateOverrides
... <jbot
... directory="%s/overrides/http"
... layer="zope.publisher.interfaces.browser.IHTTPRequest" />
... </configure>
Expand Down
12 changes: 9 additions & 3 deletions z3c/jbot/meta.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,19 @@
xmlns:meta="http://namespaces.zope.org/meta">

<meta:directives namespace="http://namespaces.zope.org/browser">

<meta:directive
name="templateOverrides"
schema=".metadirectives.ITemplateOverridesDirective"
handler=".metaconfigure.templateOverridesDirective"
/>


<meta:directive
name="jbot"
schema=".metadirectives.ITemplateOverridesDirective"
handler=".metaconfigure.templateOverridesDirective"
/>

</meta:directives>

</configure>
2 changes: 1 addition & 1 deletion z3c/jbot/metaconfigure.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def handler(directory, layer):

def templateOverridesDirective(_context, directory, layer=interface.Interface):
_context.action(
discriminator = ('override', directory, layer),
discriminator = ('jbot', directory, layer),
callable = handler,
args = (directory, layer),
)

0 comments on commit 21f666c

Please sign in to comment.