Skip to content

Commit

Permalink
Always wrap contents of zcml-additional with a <configure /> node.
Browse files Browse the repository at this point in the history
This makes it possible to use += assignments with zcml-additional.
  • Loading branch information
lukasgraf committed Apr 8, 2014
1 parent 891d372 commit 2e779a3
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CHANGES.txt
Expand Up @@ -4,7 +4,9 @@ Changelog
4.2.15 (unreleased)
-------------------

- Nothing changed yet.
- Always wrap contents of zcml-additional with a <configure /> node.
This makes it possible to use += assignments with zcml-additional.
[lgraf]


4.2.14 (2014-03-02)
Expand Down
8 changes: 8 additions & 0 deletions src/plone/recipe/zope2instance/__init__.py
Expand Up @@ -677,6 +677,7 @@ def build_package_includes(self):
os.mkdir(includes_path)

if additional_zcml:
additional_zcml = additional_zcml_template % additional_zcml
path=os.path.join(includes_path, "999-additional-overrides.zcml")
open(path, "w").write(additional_zcml.strip())

Expand Down Expand Up @@ -1019,3 +1020,10 @@ def render_file_storage(self, file_storage, blob_storage,
<i18n:registerTranslations directory="%(directory)s" />
</configure>
"""

# Template used for additional ZCML
additional_zcml_template = """\
<configure xmlns="http://namespaces.zope.org/zope">
%s
</configure>
"""

0 comments on commit 2e779a3

Please sign in to comment.