I forgot : documentation about TurboHtmlPy is http://dwayneb.free.fr/turbohtmlpy

David Bernard a écrit :
> Hi,
> 
> Nyenyec N a écrit :
> 
>>In the context of TurboGears are there any efficient solutions to do
>>this? Are the alternative templating systems well tested? Can I still
>>use widgets on my page if I switch from kid to something else?
> 
> 
> TurboHtmlPy (alternative templating engine) could may be help you.
> It supports TG's Widgets.
> About insertion of XML fragment (name xmldata in the dict return by the 
> controller), several choices :
> * fragment is a string, and you want the template engine check it and convert 
> char before insertion: use the "hpy__xml(vars.xmldata)"
> * fragment is a string, and you *don't* want the template engine check it and 
> convert char before insertion (already done...): use the 
> "hpy__raw(vars.xmldata)"
> * fragment is a string and you want to display the xml into the xhtml page 
> with 
> > and < : use "vars.xmldata" directly
> * fragment is an elementtree.Element : use "vars.xmldata" directly
> 
> To test the solution you could simply :
> * install TurboHtmlPy
>      $> easy_install TurboHtmlPy
> 
> * convert/create a template file to check time need to display XML:
> 
> #!/usr/bin/python
> # -*- coding: utf-8 -*-
> 
> html(
>      body(
>          hpy__raw(vars.xmldata),
>      ),
> )
> 
> * modify the controllors method to use the alternate template
>      @expose(template="htmlpy:prj.template.displayxml")
>      def displayxml():
>          xmldata="<greet>Hello</greet>"
>       return dict(xmldata=xmldata)
> 
> If you have any questions, I'll be please to answer/help.
> I hope TurboHtmlPy could help you.
> 

--------------------------------------------------------------
David "Dwayne" Bernard            Freelance Developer
                                   mailto:[EMAIL PROTECTED]
       \|/                         http://dwayne.java-fan.com
--o0O @.@ O0o-------------------------------------------------

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to