[Zope-CMF] CMFBoringContent.py

Tres Seaver tseaver@palladion.com
Sun, 05 Aug 2001 16:46:05 -0400


Norman Khine wrote:

> Hi,
> trying to follow the CMFBoringContent how-to, I am obstructed by the
> following error when I restart the server.
> 
> 2001-08-05T16:45:17 ERROR(200) Zope Could not import
> Products.CMFBoringProduct
> Traceback (innermost last):
>   File /usr/home/dsuk5/zope/2.4.0/lib/python/OFS/Application.py, line 552,
> in import_product
>   File
> /usr/home/dsuk5/zope/2.4.0/lib/python/Products/CMFBoringProduct/__init__.py,
> line 8, in ?
>   File
> /usr/home/dsuk5/zope/2.4.0/lib/python/Products/CMFBoringProduct/CMFBoringCon
> tent.py, line 10, in ?
>     (Object: os)
> ImportError: cannot import name afterCreate
> 
> Now looking at the line 10 for CMFBoringContent.py we have:
> 
> from Products.CMFCore.WorkflowCore import WorkflowAction, afterCreate
> 
> removing ', afterCreate' the from CMFBoringContent.py loads the product
> correctly, BUT when I try to add CMFBoringContent from the CMF I get the
> following error:
> 
> Error Type: NameError
> Error Value: global name 'afterCreate' is not defined
> 
> how is afterCreate defined correctly and where does it reside?


Ouch!  I sent a note Friday that we had just ripped out that API,

because it wasn't doing anything useful.  Delete the other usage
of it (in 'CMFBoringProduct.addBoring...') and everything will be
fine.


Tres.
-- 
===============================================================
Tres Seaver                                tseaver@zope.com
Zope Corporation      "Zope Dealers"       http://www.zope.com