[Zope-dev] How to render DTML that is not stored in the ZODB?
Hello! I have a bunch of dtml in my Oracle DB, that I of course want to render. doing the dtml-var expr=_.getitem('column_name', 1) does not work. I essence Zope does not render strings in variables to DTML. Any suggestions? (It has to be DTML) *MANY* Thanks In Advance. /dario - Dario Lopez-Kästen Systems Developer Chalmers Univ. of Technology [EMAIL PROTECTED] ICQ will yield no hitsIT Systems Services ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] How to render DTML that is not stored in the ZODB?
On Monday 19 November 2001 09:31 am, Dario Lopez-Kästen allegedly wrote: Hello! I have a bunch of dtml in my Oracle DB, that I of course want to render. doing the dtml-var expr=_.getitem('column_name', 1) does not work. I essence Zope does not render strings in variables to DTML. Any suggestions? (It has to be DTML) *MANY* Thanks In Advance. /dario My suggestion would be to create a very thin wrapper class in Python for DTMLFile and use the advanced tab of the ZSQLMethod to make each row into a DTMLMethodish type thing. See: http://www.zope.org/Documentation/Guides/ZSQL-HTML/ZSQL.1.4.6.4.html hth, /---\ Casey Duncan, Sr. Web Developer National Legal Aid and Defender Association [EMAIL PROTECTED] \---/ ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] How to render DTML that is not stored in the ZODB?
My suggestion would be to create a very thin wrapper class in Python for DTMLFile and use the advanced tab of the ZSQLMethod to make each row into a DTMLMethodish type thing. See: http://www.zope.org/Documentation/Guides/ZSQL-HTML/ZSQL.1.4.6.4.html Thanks, I'll look into that later on. For now, since I am under time-preassure, I opted for _.string.replace()... Thanks again, /dario ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )
Re: [Zope-dev] How to render DTML that is not stored in the ZODB?
Create a dtml-method programmatically and feed it your text with dtml vars embedded. Like so: def _dealWithDtml ( self, data ) : num_id = int(random.random() * 10) str_id = 'tmp' + str(num_id) self.manage_addProduct['OFSP'].manage_addDTMLMethod(id=str_id, title='') obj = self[str_id] obj.manage_edit(data, '') data = obj(self, self.REQUEST) self.manage_delObjects(str_id) return data robert - Original Message - From: Dario Lopez-Kästen [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, November 19, 2001 3:31 PM Subject: [Zope-dev] How to render DTML that is not stored in the ZODB? Hello! I have a bunch of dtml in my Oracle DB, that I of course want to render. doing the dtml-var expr=_.getitem('column_name', 1) does not work. I essence Zope does not render strings in variables to DTML. Any suggestions? (It has to be DTML) *MANY* Thanks In Advance. /dario - Dario Lopez-Kästen Systems Developer Chalmers Univ. of Technology [EMAIL PROTECTED] ICQ will yield no hitsIT Systems Services ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope ) ___ Zope-Dev maillist - [EMAIL PROTECTED] http://lists.zope.org/mailman/listinfo/zope-dev ** No cross posts or HTML encoding! ** (Related lists - http://lists.zope.org/mailman/listinfo/zope-announce http://lists.zope.org/mailman/listinfo/zope )