Hi Guru's.

I'm new to web2py and web development in general.
Hope somebody can help me.

I want to inject a html markup with python code at run time.

controller:
def test():
   dynamicHtml = XML('{{for x in range(2):}}{{=x}}hello<br />{{pass}}')
 return locals()


view: test.html
{{=dynamicHtml}}


The output is this:
{{for x in range(10):}}{{=x}}hello<br />{{pass}}

This is what I'm expecting:
1hello
2hello

Hope my explanation is clear.
What would be the best solution to implement this?

Thanks advance,
yng






-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to