on an own product (derived from ObjectManager) I try to code a render method, therefore I've coded this first

def index_html(self):
   return Globals.DTMLFile('dtml/viewKBArticle',globals())

the result of calling an URLl like this .../MyArticle/index_html
was that the above mentioned DTML-File was completely rendered
as html quoted text like this :

lt;?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml">
... etc.

Then I made a search in the mailing list and try this:

myIndex = Globals.DTMLFile('dtml/viewKBArticle',globals())

def index_html(self):
   return self.myIndex(self, self.REQUEST)

this results in :
*Error Type: TypeError*
*Error Value: unsubscriptable object

Traceback (innermost last):
 Module ZPublisher.Publish, line 101, in publish
 Module ZPublisher.mapply, line 88, in mapply
 Module ZPublisher.Publish, line 39, in call_object
 Module Products.KBProducts.kbarticle_impl, line 440, in index_html
 Module Shared.DC.Scripts.Bindings, line 306, in __call__
 Module Shared.DC.Scripts.Bindings, line 343, in _bindAndExec
 Module App.special_dtml, line 175, in _exec
 Module DocumentTemplate.DT_In, line 685, in renderwob
 Module OFS.ObjectManager, line 656, in __getitem__
 Module OFS.ObjectManager, line 241, in _getOb
TypeError: unsubscriptable object

At last I try this:

index_html = None
__call__ = Globals.DTMLFile('dtml/viewKBArticle',globals())

This results also in a TypeError (traceback see above)

Has anyboby any ideas??

Current Zope is 2.7.3, Python 2.3.4 on Windows XP SP2

Thanks in advance

Thomas Adams

fn:Thomas Adams
adr;quoted-printable:;;Richard-Strauss-Str. 27;M=C3=BCnchen;Bayern;81677;Deutschland
email;internet:[EMAIL PROTECTED]
tel;work:089 55 186 500
tel;home:089 470 270 19
tel;cell:0178 544 83 05
note;quoted-printable:Handy Interone:=0D=0A=
	0163 432 9608

Zope maillist  -  Zope@zope.org
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-dev )

Reply via email to