예제 #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é! ---]]>"',
     ))