Plone and Python scripts

I use Plone with Python scripts, I understand that scripts are limited in Plone, and I also understand that I can create Python scripts in the Extensions folder for a fully functional script.

But how do I send information between two scenarios? For example, script1.py is located in ZMI and has a directory that is a URL, can the URL be exported as a Python path? Script2.py is in the Plone Extensions folder, how can I send information from script1 to script2? and vice versa?

In addition, Script2.py must be invoked by the script1.py

Any help would be greatly appreciated.

+4
source share
2 answers

The Python scripts in the Extensions folder are typically used as external methods. This section of the Zope book explains external methods in more detail. Once this is created, you can call it by what identifier you give it in ZMI with another script or template in zope. You can call it through another script.

+2
source

External methods are currently less recommended for Python unlimited privileges in favor of Browser Views , which are Zope 3 components registered through ZCML and accessible from templates using the context / @@ name_of_your_view / your_method (TALES expression syntax).

Learn more about http://plone.org/documentation/manual/developer-manual/archetypes/appendix-practicals/b-org-creating-content-types-the-plone-2.5-way/zope-3-views

+2
source

Source: https://habr.com/ru/post/1313432/


All Articles