Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Always wrap contents of zcml-additional with a <configure /> node. #13

Merged
merged 1 commit into from
Apr 9, 2014
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion CHANGES.txt
Original file line number Diff line number Diff line change
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
Original file line number Diff line number Diff line change
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>
"""