[Zope] manage_addDocument add DTML Method under Zope 2.6.0

Devin L. Ganger Devin L. Ganger" <devin@thecabal.org
Sun, 9 Feb 2003 04:03:25 -0800


Can anyone else please confirm the odd behavior I'm seeing in 2.6.0?

With the following Python script fragment:

  # Import a standard function, and get the HTML request and response objects.

  from Products.PythonScripts.standard import html_quote
  
  # Sample creation

  entries_folder=container.entriesid = "ob000"
  title = "Example's Title"
  data = "Some good crunchy data here, move along."
  entries_folder.manage_addProduct['OFSP'].manage_addDocument(id, id)
  entry=getattr(entries_folder, id)
  entry.manage_edit(html_quote(data), title)

The object being created is a DTML Method, *not* a DTML Document.  This
is really frustrating, as I need this object to have its own properties
and namespace.

I'm creating around 600 of them and will be adding an interface to create
more programmatically, so I need to know how I'm screwing this up if any.
Between the Zope book, the help files, and Google, I've run myself ragged
on this one.

Any help appreciated.  Thanks in advance.

-- 
Devin L. Ganger <devin@thecabal.org>
Co-Admin, The cabalSASL Project ( http://sasl.thecabal.org/ )
A man, a miss, a car -- a curve,
He kissed the miss and missed the curve -- Burma Shave (1948)