From: Wichert A. <svn...@pl...> - 2010-08-29 22:47:20
|
Author: wichert Date: Sun Aug 29 22:47:11 2010 New Revision: 39510 Modified: plone.dexterity/trunk/docs/HISTORY.txt plone.dexterity/trunk/plone/dexterity/utils.py Log: Send ObjectCreatedEvent event from createContent utility method. Modified: plone.dexterity/trunk/docs/HISTORY.txt ============================================================================== --- plone.dexterity/trunk/docs/HISTORY.txt (original) +++ plone.dexterity/trunk/docs/HISTORY.txt Sun Aug 29 22:47:11 2010 @@ -4,6 +4,9 @@ 1.0b6 - unreleased ------------------ +* Send ObjectCreatedEvent event from createContent utility method. + [wichert] + * Update content base classes to use allow keyword arguments to set initial values for instance variables. [wichert] Modified: plone.dexterity/trunk/plone/dexterity/utils.py ============================================================================== --- plone.dexterity/trunk/plone/dexterity/utils.py (original) +++ plone.dexterity/trunk/plone/dexterity/utils.py Sun Aug 29 22:47:11 2010 @@ -6,6 +6,8 @@ from zope.component import createObject from zope.dottedname.resolve import resolve +from zope.event import notify +from zope.lifecycleevent import ObjectCreatedEvent from plone.autoform.interfaces import IFormFieldProvider from plone.dexterity.interfaces import IDexterityFTI @@ -114,6 +116,7 @@ for (key,value) in kw.items(): setattr(content, key, value) + notify(ObjectCreatedEvent(content)) return content |