[Zope3-Users] Re: Assigning a name dinamically to a content object

Philipp von Weitershausen philipp at weitershausen.de
Sun Nov 21 13:59:57 EST 2004


Nicholas Wieland wrote:
> The bugtracker has a feature that I'd like to implement, but I'm not
> able to find it in the source code (ouch! ... :p).
> When a bug is added the content object names itself as "1", "2" and so
> on, instead of "contentobject-1", "content-object-2".
> Where do I have to look or how can I do ?

You need to do two things:

1. You need to tell Zope that your container implementation wants to 
choose its own names. You do that by marking it with the 
IContainerNamesContainer marker interface.

2. You need to write an INameChooser adapter for that container 
implementation that chooses and checks names according to some rules 
that you implement in that adapter.

This should be documented somewhere in Stephan's book.

Philipp



More information about the Zope3-users mailing list