Skip to content

Commit

Permalink
Fix rst syntax
Browse files Browse the repository at this point in the history
  • Loading branch information
ale-rt committed Feb 11, 2025
1 parent b7b8d3b commit 3395dc5
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 21 deletions.
38 changes: 17 additions & 21 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -64,28 +64,24 @@ Imagine this situation:
* The template override in the project no longer works and the other person starts asking questions or complaining.

To solve this problem, you can register that a template path is deprecated.
First add a dictionary to the ``base`` package, let's say in a file ``utils.py``:

```
deprecated_templates = {
"base.original.pt": "base.new.pt",
}
```

In your ``configure.zcml`` you add:

```
<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:zcml="http://namespaces.zope.org/zcml"
>
...
<configure zcml:condition="have jbot-deprecations">
<include package="z3c.jbot" file="meta.zcml" />
<jbot:jbotDeprecated dictionary=".utils.deprecated_templates">
First add a dictionary to the ``base`` package, let's say in a file ``utils.py``::

deprecated_templates = {
"base.original.pt": "base.new.pt",
}

In your ``configure.zcml`` you add::

<configure
xmlns="http://namespaces.zope.org/zope"
xmlns:zcml="http://namespaces.zope.org/zcml"
>
...
<configure zcml:condition="have jbot-deprecations">
<include package="z3c.jbot" file="meta.zcml" />
<jbot:jbotDeprecated dictionary=".utils.deprecated_templates">
</configure>
</configure>
</configure>
```

TODO: check if I have this correct. I think we need to define xmlns:jbot.

Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
description="Drop-in template overrides.",
long_description=(open('README.rst').read() + "\n" +
open('CHANGES.rst').read()),
long_description_content_type='text/x-rst',
classifiers=[
'Development Status :: 5 - Production/Stable',
'Framework :: Zope',
Expand Down

0 comments on commit 3395dc5

Please sign in to comment.