Skip to content

Commit

Permalink
Merge branch 'main' into config-with-default-template-a89af8f2
Browse files Browse the repository at this point in the history
  • Loading branch information
mauritsvanrees committed Jun 19, 2024
2 parents bfe1de7 + 7df9f28 commit 502874b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 16 deletions.
5 changes: 5 additions & 0 deletions news/152.bugfix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Do not fail on startup when the ``requests`` library is missing.
Conditionally load the views to migrate to Volto: only when the ``requests`` library is available.
We don't want to make this a hard dependency.
If you need the migration views, you should include the ``requests`` package yourself.
[maurits]
34 changes: 18 additions & 16 deletions src/plone/volto/browser/configure.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -32,23 +32,25 @@
zcml:condition="have plone-5"
/>

<browser:page
name="migrate_richtext"
for="zope.interface.Interface"
class=".migrate_richtext.MigrateRichTextToVoltoBlocks"
template="migrate_richtext.pt"
permission="cmf.ManagePortal"
zcml:condition="have plone-60"
/>
<configure zcml:condition="installed requests">
<browser:page
name="migrate_richtext"
for="zope.interface.Interface"
class=".migrate_richtext.MigrateRichTextToVoltoBlocks"
template="migrate_richtext.pt"
permission="cmf.ManagePortal"
zcml:condition="have plone-60"
/>

<browser:page
name="migrate_to_volto"
for="zope.interface.Interface"
class=".migrate_to_volto.MigrateToVolto"
template="migrate_to_volto.pt"
permission="cmf.ManagePortal"
zcml:condition="have plone-60"
/>
<browser:page
name="migrate_to_volto"
for="zope.interface.Interface"
class=".migrate_to_volto.MigrateToVolto"
template="migrate_to_volto.pt"
permission="cmf.ManagePortal"
zcml:condition="have plone-60"
/>
</configure>

<browser:viewlet
name="voltobackendwarning"
Expand Down

0 comments on commit 502874b

Please sign in to comment.