Example #1
0
 def render_script(self, node):
     node.html.h1['foo'] = 'bar'
     html = node.html.render(model=Model2())
     javascript.fill(node.replace(None, node.script), dict(html=html))
Example #2
0
 def render_script(self, node):
     html = node.html.render(adapter=adapter)
     javascript.fill(node.replace(None, node.script), dict(html=html))
Example #3
0
File: js_fill.py Project: AvdN/tdi
 def render_script(self, node):
     javascript.fill(node, dict(
         a=10,
         b=u'Andr\xe9',
         c=json,
     ), pattern=_re.compile(ur'@(?P<name>[^@]+)@'))
Example #4
0
File: js_fill.py Project: AvdN/tdi
 def render_script(self, node):
     javascript.fill(node, dict(
         a=10,
         b=u'Andr\xe9',
         c=json,
     ), as_json=False)
Example #5
0
File: js_fill.py Project: AvdN/tdi
 def render_script(self, node):
     javascript.fill(node, dict(
         a=10,
         b=u'Andr\xe9',
         c=json,
     ), pattern=ur'@(?P<name>[^@]+)@', as_json=False)
Example #6
0
 def render_script(self, node):
     javascript.fill(node, dict(
         var=javascript.SimpleJSON([1, 2, 3, 4]),
         str=u'"Hey André! ---]]>"',
     ))