Has anyone had any luck creating a custom portlet following the Developer's Guide? I'm attempting to create a portlet that will show events much like the Event Console. I've followed the developer guide and everything has worked with one exception: my new method does not appear to be getting
registered in zport.

My __init__.py has the following after the definition of my getJSONEventList
method:

from Products.ZenModel.ZentinelPortal import ZentinelPortal
ZentinelPortal.getJSONEventList = getJSONEventList

After installing the zenpack, logs/Z2.log shows a 404 when trying to pull
/zport/getJSONEventList

Make sure that your getJSONEventList method is commented.

def getJSONEventList(self, ...):
        """
        This is the commend for my method.
        """
        code goes here..

Zope won't expose methods via URL unless they're commented.
_______________________________________________
zenoss-users mailing list
[email protected]
http://lists.zenoss.org/mailman/listinfo/zenoss-users

Reply via email to