class ZMyClass(MyClass, Folder): """ Zope Folder subclass """ def getData(self): REQUEST = self.REQUEST RESPONSE = REQUEST.RESPONSE ... validate REQUEST variables ... return MyClass.getData(self, REQUEST['user'], REQUEST['field'])
This way you can use <dtml-var getData> without passing any arguments.
This works great! Thanks! But I see that there is something else wrong with my plan. When I try to call MyClass.getData(self, ...), I get an error essentially saying that my ZMyClass instance is not an instance of MyClass, so I can't call that method. Python's isinstance tells me that this is the case even though issubclass verifies that ZMyClass is a subclass of MyClass. Is it not possible to wrap regular Python classes with Zope wrappers simply by inheriting from the regular class and a Zope class like Folder/SimpleItem? Kevin Smith Kevin.Smith@theMorgue.org