[Zope-CMF] Customizing portal_types

seb bacon seb@jamkit.com
Fri, 27 Jul 2001 20:49:00 +0100


* Valérie Aulnette <vaulnette@yahoo.fr> [010726 13:48]:
> Hi !
> 
> I need to modify some methods in
> CMFDefault.Document.py.
> For that, I used inheritance but I don't know how to
> attach my new file to CMF so that CMF recognize my
> methods and not the default ones.
> 
> I need to change the function addDocument as well : is
> it possible to modify it using inheritance ? (as it
> doesn't belong to a class...?)
> 
> Any hints or documentation that could help me ?

Look in __init__.py and Portal.py to see how Document is added, and
copy that.

You can't inherit the addDocument constructor, so you might as well
just rewrite it.

Cheers,

seb