You hooked into the __init__
for the schema of your content type. The schema is used as the basis for the fields populating your content, but it's not the content type class itself.
If you want to hook into content type creation, you register event subscribers instead:
from zope.app.container.interfaces import IObjectAddedEvent
@grok.subscribe(IHorse, IObjectAddedEvent)
def logHorseCreated(horse, event):
logger.info('Created a horse')
If you really have to customize the content item initialization in an __init__
method, you'd have to create your own custom content class instead.
from plone.dexterity.content import Item
class Horse(Item):
def __init__(self, id=None):
super(Horse, self).__init__(id)