[Zope3-Users] Using attributes in a nameChooser

Ruslan Spivak rspivak at nuxeo.com
Fri Aug 5 09:49:42 EDT 2005


В Птн, 05/08/2005 в 12:25 +0200, Florian Lindner пишет:
> Hello,
> in a Containers chooseName function I want to use a attribute of the created 
> object:
> 
>     def chooseName(self, name, object):
>         return object.name
> 
> 
>   File 
> "/home/florian/Desktop/zope/lib/python/CS/ContentFolder/contentfolder.py", 
> line 15, in chooseName
>     return object.name
> AttributeError: 'Link' object has no attribute 'name'
> 

You should define atributes from schema you want to access with
set_before_add in your addform directive.

Ruslan



More information about the Zope3-users mailing list