#!/usr/bin/env python
import warnings as _warnings
_warnings.resetwarnings()
_warnings.filterwarnings('error')
# BEGIN INCLUDE
from tdi import html
from tdi.tools import javascript
template = html.from_string("""
dynamic js-only-content
""".lstrip())
class Model(object):
def render_h1(self, node):
node.content = u"My Heading"
def render_script(self, node):
html = node.html.render()
javascript.fill(node.replace(None, node.script), dict(html=html))
template.render(Model())