示例#1
0
文件: subrender5.py 项目: AvdN/tdi
 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))
示例#2
0
文件: subrender4.py 项目: AvdN/tdi
 def render_script(self, node):
     html = node.html.render(adapter=adapter)
     javascript.fill(node.replace(None, node.script), dict(html=html))
示例#3
0
文件: js_fill.py 项目: 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>[^@]+)@'))
示例#4
0
文件: js_fill.py 项目: AvdN/tdi
 def render_script(self, node):
     javascript.fill(node, dict(
         a=10,
         b=u'Andr\xe9',
         c=json,
     ), as_json=False)
示例#5
0
文件: js_fill.py 项目: 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)
示例#6
0
文件: js_tools_fill.py 项目: AvdN/tdi
 def render_script(self, node):
     javascript.fill(node, dict(
         var=javascript.SimpleJSON([1, 2, 3, 4]),
         str=u'"Hey André! ---]]>"',
     ))