Scripts Library

Help
2012-01-05
2013-04-25
  • Hi Eric, I am using a script library for some Python scripts that repeat over different applications, this is how I access them:
    container.intranet.scripts.helloworld()

    would you know how to make this work on a local installation of Plone, (the site is called Plone, as in default), because I would like to test some scripts locally before bringing them to the server?

    Thanks and regards,
    Eliott

     
  • Eric Brehault
    Eric Brehault
    2012-01-06

    Hello,

    a simple and direct way would to go in the ZMI, in the site root, add a new script and enter the code of your script.

    As the script is in the root it can be accessed wherever directly by acquisition:
    container.helloworld()
    (it is equivalent to : container.getParentNode().getParentNode().helloworld(), but you do not need to know how many getParentNode you need)

    eric

     
  • Thank you very much indeed, it works as you said.
    Eliott