Jaroslav Šatkevič wrote:
[..]
subjectFactory = Factory(Subject, title=_(u"Create new subject"))
def subject_added_event(subject, event):
"""Subject processing after creation:
add wiki
"""
wiki_id = 'wiki'
default_text = 'Mano ((batai)) buvo du, vienas dingo, nerandu.'
obj = event.object
if wiki_id not in obj.objectIds():
obj.invokeFactory('WikiCatalog', id=wiki_id,)
obj.setDefaultPage(wiki_id)
Why this don't work?
Since you don't base your subject type on Archetypes
you have to make sure for yourself that (i) you register
it with the types tool using a "Factory-based Type
Information with dynamic views" and (ii) that you
equip your subject class with the BrowserDefaultMixin
class.
Raphael
--
Jaro
_______________________________________________
Product-Developers mailing list
[email protected]
http://lists.plone.org/mailman/listinfo/product-developers