[Product-Developers] finishing a product
John DeStefano
john.destefano at gmail.com
Tue Apr 8 20:18:41 UTC 2008
Thanks, Maurits and Hedley, for an excellent kick-start. I have much
to review and implement here.
Maurits van Rees wrote:
>> http://deesto.pastebin.com/f4d16e1bd
>
> That subscriber is now subscribed to events on *all* objects. Not all
> objects will have all the info you want, like affectedArea. So that
> can give problems.
>
> You can either check for portal_type='Announcement' in the event
> handler, or (better) you create a (marker) interface, let the
> Announcement class implement it and register the subscriber for that
> interface instead of '*'.
If I may ask: how would you do this, by adding another condition to
the workflow subscriber?
or portal_type != 'Announcement' # ?
> Also: perhaps an error in pasting, but lines 18 and further are
> indented too much. After the 'return' on line 17 you cannot continue
> with the same indentation level.
Definitely a mistake on my part. Thank you.
"Hedley Roos" wrote:
>
> It sounds as though you have subclassed BaseFolder to create your own
> folderish type. Set allowed_content_types to = ('Topic',) in the class
> declaration. Restart. Reinstall. It should work.
This works to add Topic (Collection in v3) object to the list of
addable types. I would like to either add one programmatically inside
this Folder-ish type when it is created, or at least limit the number
that can be created to only one. But more importantly, I'd like to
make the Topic the default view once it exists (or, again, at least
make it possible to make the Topic view the default view). Simply
making Topics addable doesn't seem to do this.
Thanks,
~John
More information about the Product-Developers
mailing list