[Twisted-web] about macro and render

Manlio Perillo manlio_perillo at libero.it
Wed Feb 21 05:54:50 CST 2007


Valentino Volonghi aka Dialtone ha scritto:
> 
> 
> On Wed, 21 Feb 2007 12:32:08 +0100, Manlio Perillo 
> <manlio_perillo at libero.it> wrote:
>> Hi.
>>
>> I want to compose a page, using a main template.
>> A simple solution is to use macros
>>
>> class Resource(rend.rend):
>>   def macro_main(self, ctx):
>>      return loaders.xmlfile(...)
>>
>>
>> The macro_main method is called only once.
>>
>> However it seems that macros are going to be removed, moreover if I 
>> change 
> 
> Not to my knowledge, at least I'd be opposed/incline to re-implement them
> because I use them extensively in all my projects.
> 

Yes, they are very handy.

>> the child template, I have to reload the server.
> 
> Not really... just change the macro too with something like touch.
> 

Thanks, I just forget it.


 > [...]



Regards  Manlio Perillo



More information about the Twisted-web mailing list