[Zope-CMF] Add file inside CMF product during install

Dieter Maurer dieter at handshake.de
Sun Feb 29 13:59:32 EST 2004


Steinar Eriksen wrote at 2004-2-29 11:06 +0100:
>I would like to add a file during my CMF product installation; specifically
>I would like to have a JavaScript being added via Install.py to the product
>folder after installing my product to a Plone site.
>
>
>I can manually add the script (as an external file) inside the ZMI after
>setting up my product but I would like to have it added automatically as
>part of the product install.

Everything you can do manually, you can do by program:

  Look at the source of the management pages you use to do it
  manually.

  The form "action" tells you which method you must use,
  the form controls the parameters needed by the method.

  Sometimes, you need to look at the URL as well.
  It may contain intermediate objects necessary to
  access the method. Use "restrictedTraverse" to
  resolve the URL (without the host path) into the object.

  Call the method with the necessary parameters.

That's all.

-- 
Dieter



More information about the Zope-CMF mailing list