This is a FAQ. See lib/python/Products/PythonScripts/README.txt. -aj --On Dienstag, 19. August 2003 1:21 Uhr +0000 "Lee J. McAllister" <ljmcallister@hotmail.com> wrote:
Hi folks, I'm fairly new to Zope and Python so this is probably a completely obvious one for most of you but I'd really appreciate any help you can give me on how to do this. I'm trying to add CMF Link instances to Plone folders using a script. The intention is to provide crosslinking of articles at several places through out the site to be determined at their creation time.
Attempts to call the addLink method directly without importing the Link Class produces complaints about attempting to use an undefined global so I attempted to import the Link class using
from Products.CMFDefault import Link
but it produces an error of
Error Type : ImportError Error Value : import of "Link" from "Products.CMFDefault" is unauthorized. You are not allowed to access Link in this context
Does the Link class need to be imported to create a Link instance in a Python script? Is addLink even the appropriate method to be calling to do this or am I barking up the wrong tree here? Am I just a lost Java programmer falling on his face making the jump to the Python wagon?
Any suggestions or how-to referances you can provide me would be greatly appreciated.
Thanks Lee McAllister
_________________________________________________________________ Protect your PC - get McAfee.com VirusScan Online http://clinic.mcafee.com/clinic/ibuy/campaign.asp?cid=3963
_______________________________________________ Zope maillist - Zope@zope.org http://mail.zope.org/mailman/listinfo/zope ** No cross posts or HTML encoding! ** (Related lists - http://mail.zope.org/mailman/listinfo/zope-announce http://mail.zope.org/mailman/listinfo/zope-dev )