I'm using some of Casey Duncans code that I got off of zopelabs.com in a product that I created. The code allows you to call any object generically. The code is listed below this message. The problem I have is if my object is called from a DTML Method like <dtml-var object> the "args" attribute of the REQUEST object disappears and I get an attribute error. I can call it like this <dtmi-var "object(this(), REQUEST)"> and it will work. Anyway, somewhere the REQUEST object is changing. Any ideas?


import Acquisition
from ZPublisher.mapply import mapply
from ZPublisher.Publish import call_object, missing_name, dont_publish_class

class MyClass(Acquisition.Implicit,...):
  def __init__(self, some_object_id):
      self.data_source_id = some_object_id

  def index_html(self, REQUEST, RESPONSE):
       object = getattr(self.aq_parent, self.data_source_id)
       result = mapply(object, REQUEST.args, REQUEST,
                       REQUEST, bind=1)
       ...process the result...
       return result

Zope-Dev maillist - [EMAIL PROTECTED]
** No cross posts or HTML encoding! **
(Related lists - http://mail.zope.org/mailman/listinfo/zope-announce
http://mail.zope.org/mailman/listinfo/zope )

Reply via email to