Beispiel #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))
Beispiel #2
0
 def render_script(self, node):
     html = node.html.render(adapter=adapter)
     javascript.fill(node.replace(None, node.script), dict(html=html))
Beispiel #3
0
 def render_script(self, node):
     javascript.fill(node, dict(
         a=10,
         b=u'Andr\xe9',
         c=json,
     ), pattern=_re.compile(ur'@(?P<name>[^@]+)@'))
Beispiel #4
0
 def render_script(self, node):
     javascript.fill(node, dict(
         a=10,
         b=u'Andr\xe9',
         c=json,
     ), as_json=False)
Beispiel #5
0
 def render_script(self, node):
     javascript.fill(node, dict(
         a=10,
         b=u'Andr\xe9',
         c=json,
     ), pattern=ur'@(?P<name>[^@]+)@', as_json=False)
Beispiel #6
0
 def render_script(self, node):
     javascript.fill(node, dict(
         var=javascript.SimpleJSON([1, 2, 3, 4]),
         str=u'"Hey André! ---]]>"',
     ))