Created
September 11, 2009 00:04
-
-
Save n8agrin/184934 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
>>> t=tornado.template.Template('<html>{{ bar }}</html>') | |
>>> t.generate() | |
ERROR:root:<string> code: | |
1 def _execute(): | |
2 _buffer = [] | |
3 _buffer.append('<html>') | |
4 _tmp = bar | |
5 if isinstance(_tmp, str): _buffer.append(_tmp) | |
6 elif isinstance(_tmp, unicode): _buffer.append(_tmp.encode('utf-8')) | |
7 else: _buffer.append(str(_tmp)) | |
8 _buffer.append('</html>') | |
9 return ''.join(_buffer) | |
Traceback (most recent call last): | |
File "<stdin>", line 1, in <module> | |
File "tornado/template.py", line 127, in generate | |
return execute() | |
File "<string>", line 4, in _execute | |
NameError: global name 'bar' is not defined |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment