[Product-Developers] Re: implementing Product interfaces
deesto
john.destefano at gmail.com
Mon Jun 16 16:11:24 UTC 2008
Hedley Roos wrote:
>
> Hedley Roos wrote:
>> Your post reminded me of a bit of code I have lying somewhere. Basically
>> I wanted to activate a calendar on a particular folder.
>>
>> from p4a.calendar.interfaces import ICalendarConfig
>> config = ICalendarConfig(folder)
>> config.calendar_activated = True
>> folder.reindexObject()
>>
>> IIRC you can then do http://server/folder/@@month.
>>
>> HTH
>> Hedley
>>
> Sorry for replying to my own post, but as Martin stated the correct
> approach is using zcml. My approach requires that you subscribe to your
> folserish item's create event and then activate that interface.
>
Understood. But when I add Martin's class to the folderish configure.zcml,
there doesn't seem to be any effect. In fact, I see a Sub-types->Calendar
drop-down for folders, but my folderish object still displays a blank
Sub-types menu (with no drop-down items). Again, no errors or feedback when
installing the product or adding an object, but I have to assume the
interface still isn't taking hold.
http://deesto.pastebin.com/f2ce2ae07
--
View this message in context: http://www.nabble.com/-Product-Developers--implementing-Product-interfaces-tp17830937s20094p17867883.html
Sent from the Product Developers mailing list archive at Nabble.com.
More information about the Product-Developers
mailing list