[Zope] DTMLFile usage

Johan Carlsson johanc at easypublisher.com
Mon Jan 19 11:29:52 EST 2004


Alexis Roda wrote:
> fowlertrainer at anonym.hu wrote:
> 
>> Hello zope,
>>
>>   I don't understand why the zope render some objects, and not render
>>   others.
>>
>>   I have been used an minimal product to test it:
>>
>>   When I write this:
>>   class ....
>>     ....
>>     def index_html(self):
>>         "used to view content of the object"
>>         import Globals
>>         df=Globals.DTMLFile('www/index',globals())
>>         return df
>>
>>   Zope is not rendering the result.
>>
>>   When I write this:
>>   class ....
>>     ....
>>     import Globals
>>     index_html=Globals.DTMLFile('www/index',globals())
>>
>>   Zope is rendering my dtml file in correct way.
>>
>>   So: if I do same things, zope why don't do same results ???
> 
> 
> Look at problem this way, "if zope don't do same results, I'm doing the 
> same thing?".
> 
> The first index_html returns a DTMLMethod instance (IIRC), while the 
> second one *IS* a DTMLMethod instance, and so, when called, renders the 
> DTMLMethod.

With the correction that it's DTMLFile objects not DTMLMethod.
They are not the same.


-- 
Johan Carlsson          Tel: + 46 8 31 24 94
Colliberty              Mob: + 46 70 558 25 24
Torsgatan 72            Email: johanc at easypublisher.com
SE-113 37 STOCKHOLM     Skype: colliberty





More information about the Zope mailing list