yes. need latest web2py stable
from gluon.template import render
print render(content='{{for i in range(10)}}{{=a}}{{pass}}',context=
{'a':'hello\n'})
if you want to use the helpers you also need to import them
from gluon.template import render
from gluon.html import *
print render(content='{{for i in range(10)}}{{=a}}{{pass}}',context=
{'a':DIV('hello')})
You can use context='..' or stream=open(...) or filename='...', you
can also pass a path=... required for lookup in case the tamplate
content contains {{include...}} {{extend...}}
If you do this your code will be bound to be GPL2 because web2py
source is GPL2.
Massimo
On Nov 12, 8:31 pm, ShoqulKutlu <[email protected]> wrote:
> Hi,
>
> Can we use just template system of web2py with another application?
>
> Thanks,
> Kutlu
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/web2py?hl=en
-~----------~----~----~----~------~----~------~--~---