Plone 5 External Method

I am trying to include an External Method in Plone 5.0.5
I installed the zope instance with the unified installer, with a zeoserver and 3 clients.

1.Should i change my config? If yes, what should i add (i tried to add 'zope-conf-additional = extensions ${buildout:directory}/Extensions ' to the [buildout] section , but after rebuilding, nothing changes...
2. Where should I place my Extensions - folder? In my clients directories or in the root directory. Again I've tried it, and when adding my External method, it never accepts...

Thanks in advance for your help!
Greetings,
Joepie Platteau.

1 Like

External Methods in the context of Plone 5? What is the purpose? External Methods are no longer used in Plone since ages. Write a browser view.

-aj

I need to create a python script which includes a library that would not be permitted in the ZMI - Python Script.
But a browser view can't do that either, or am I wrong?
Joepie

Browser views are unrestricted. External methods are in the museum and should remain there.

-aj

@platteau: External methods still work, but aren't well supported by documentation. BrowserViews are unrestricted (as is all filesystem) code and often preferred by experienced developers as its easier to deploy in a package. But there is more to learn, for example python packaging.
http://docs.plone.org/develop/plone/views/browserviews.html#creating-and-registering-a-view
But there are tutorials to help you.

BTW, there is one other possibility. If the library you want to access from the ZMI is common, I've been working on a package you can install to allow many commonly request imports in python scripts. https://github.com/collective/collective.trustedimports. Still new but please raise a ticket if the code you want to access should be included.

1 Like