[z3-five] add zope 2 object instance using five view

Maciej Wisniowski maciej.wisniowski at coig.katowice.pl
Mon Nov 20 22:59:04 CET 2006


> how to make a Zope 2 Instance of an object that has an adding view with 
> a  call method
> 
>  def __call__(self, add_input_name='', domain_class='', title='', 
> submit_add=''):
> 
> The following code doues not work:
> 
> obj = current_object
> new = obj.manage_addProduct['alchemist'].add-container(x,x,x)
> 
You want to create an instance of a class or instance of a class and
add this to 'obj'???


Maybe something like:

# if you have product alchemist with alchemist.py and Alchemist class
# inside
from Products.alchemist.alchemist import Alchemist
obj = current_object
obj._setObject('objectid', Alchemist(?, ?, ?))

I'm not sure what you want to do.

-- 
Maciej Wisniowski


More information about the z3-five mailing list