[Zope3-dev] Re: Problem with content object attributes and DublinCore

Philipp von Weitershausen philipp at weitershausen.de
Thu Oct 28 12:47:49 EDT 2004


Nicholas Wieland wrote:
> Hi again, I have a problem with a content object, when I try to add it
> it returns a system error.
> 
> #category.py
> class Category (Folder):
> 
>   implements (ICategory, ISiteContained, IProductContainer, ILocation)
> 
>   def setTitle (self, title):
>     dc = IZopeDublinCore (self)
>     dc.title = title
> 
>   def getTitle (self):
>     dc = IZopeDublinCore (self
>     return dc.title
> 
>   title = property (setTitle, getTitle)

This should read:

   title = property(getTitle, setTitle)

Like Jim said, read your docs and learn how to interpret errors better. 
Python gives tracebacks for a reason and 90% of the time they are quite 
informative and lead you to the problem.

Philipp



More information about the Zope3-dev mailing list