Not sure where the variations variable is coming from, but putting 
pre-formatted HTML into a view is simple. In your controller, you have to 
include the html as an item in the dict() that is returned.

Here is an example controller:

def test():
    html = '<h1>Hello World</h1>'
    return dict(html=html)

Then in your view:

{{extend 'layout.html'}}
{{=XML(html)}}

You could also have your controller return the wrapped XML object as well:

def test():
    html = XML('<h1>Hello World</h1>')
    return dict(html=html)

Then in your view:

{{extend 'layout.html'}}
{{=html}}

I do this sort of thing all the time to generate the required HTML, 
JavaScript, and CSS for the plugins I create.

Reply via email to