~catherine-devlin/templatecookoff/trunk

« back to all changes in this revision

Viewing changes to cookoff.html

  • Committer: Catherine Devlin
  • Date: 2010-06-09 12:48:44 UTC
  • mfrom: (15.1.3 cookoff)
  • Revision ID: cat@bothari-20100609124844-96keqysi9vnisdxu
Added chameleon, but there is an error

Show diffs side-by-side

added added

removed removed

Lines of Context:
72
72
    args, slots, macro, global_scope)
73
73
  File "/home/cat/env/cookoff/lib/python2.6/site-packages/chameleon/core/template.py", line 197, in cook_and_render
74
74
    utils.raise_template_exception(kwargs, sys.exc_info())
75
 
  File "/tmp/tmpbGxaRv.py", line 29, in render
 
75
  File "/tmp/tmp0FV3iL.py", line 29, in render
76
76
    _tmp1 = _lookup_attr(econtext['everything']['universe'], 'answer')
77
77
  File "/home/cat/env/cookoff/lib/python2.6/site-packages/chameleon/core/utils.py", line 332, in __getitem__
78
78
    raise NameError(key)
79
79
RuntimeError: Caught exception rendering template.
80
80
 - Expression: ``everything['universe'].answer``
81
81
 - Filename:   /home/cat/proj/cookoff/<span class="highlighted" style="background-color:lightgreen">genshi.html</span>
82
 
 - Arguments:  match_templates: &lt;MatchTemplates - at 0x20523d0&gt;
83
 
               xincludes: &lt;XIncludes - at 0x2052d90&gt;
 
82
 - Arguments:  match_templates: &lt;MatchTemplates - at 0x10d8910&gt;
 
83
               xincludes: &lt;XIncludes - at 0x10d8890&gt;
84
84
 
85
85
NameError: everything
86
86
</code></pre></td></tr>
110
110
    args, slots, macro, global_scope)
111
111
  File "/home/cat/env/cookoff/lib/python2.6/site-packages/chameleon/core/template.py", line 197, in cook_and_render
112
112
    utils.raise_template_exception(kwargs, sys.exc_info())
113
 
  File "/tmp/tmpmKSDWw.py", line 53, in render
 
113
  File "/tmp/tmpJlTOyq.py", line 53, in render
114
114
    _tmp1 = econtext['weapon']
115
115
  File "/home/cat/env/cookoff/lib/python2.6/site-packages/chameleon/core/utils.py", line 332, in __getitem__
116
116
    raise NameError(key)
117
117
RuntimeError: Caught exception rendering template.
118
118
 - Expression: ``weapon``
119
119
 - Filename:   /home/cat/proj/cookoff/genshi.txt
120
 
 - Arguments:  match_templates: &lt;MatchTemplates - at 0x20f1f50&gt;
121
 
               weapons: &lt;tuple - at 0x7f2be08d3190&gt;
122
 
               xincludes: &lt;XIncludes - at 0x2061b10&gt;
 
120
 - Arguments:  match_templates: &lt;MatchTemplates - at 0x10ea310&gt;
 
121
               weapons: &lt;tuple - at 0x7fad9a96a190&gt;
 
122
               xincludes: &lt;XIncludes - at 0x118bb50&gt;
123
123
               everything: {...} (1)
124
124
               answer: 42
125
 
               universe: &lt;Universe - at 0x205fa90&gt;
 
125
               universe: &lt;Universe - at 0x118f850&gt;
126
126
 
127
127
NameError: weapon
128
128
</code></pre></td><td><pre><code>Traceback (most recent call last):
140
140
    args, slots, macro, global_scope)
141
141
  File "/home/cat/env/cookoff/lib/python2.6/site-packages/chameleon/core/template.py", line 197, in cook_and_render
142
142
    utils.raise_template_exception(kwargs, sys.exc_info())
143
 
  File "/tmp/tmpaKAFzm.py", line 27, in render
 
143
  File "/tmp/tmprIFpHI.py", line 27, in render
144
144
    _tmp1 = _lookup_attr(econtext['everything']['universe'], 'answer')
145
145
  File "/home/cat/env/cookoff/lib/python2.6/site-packages/chameleon/core/utils.py", line 332, in __getitem__
146
146
    raise NameError(key)
147
147
RuntimeError: Caught exception rendering template.
148
148
 - Expression: ``everything['universe'].answer``
149
149
 - Filename:   /home/cat/proj/cookoff/<span class="highlighted" style="background-color:lightgreen">genshi.txt</span>
150
 
 - Arguments:  match_templates: &lt;MatchTemplates - at 0x20f8d10&gt;
151
 
               xincludes: &lt;XIncludes - at 0x20f8450&gt;
 
150
 - Arguments:  match_templates: &lt;MatchTemplates - at 0x118f850&gt;
 
151
               xincludes: &lt;XIncludes - at 0x118fe10&gt;
152
152
 
153
153
NameError: everything
154
154
</code></pre></td></tr>
159
159
 
160
160
 
161
161
 
 
162
 
162
163
<tr><td rowspan="1">python3_string_format v. 2.6.4 (r264:75706, Apr  1 2010, 02:55:51) 
163
164
[GCC 4.4.3 20100226 (Red Hat 4.4.3-8)]</td><td><pre><code>The answer to the Ultimate
164
165
Question is {universe.answer}.
173
174
I don't know how to loop.</code></pre></td><td><pre><code>Traceback (most recent call last):
174
175
  File "cookoff.py", line 70, in method_result
175
176
    result = method(data)
176
 
  File "cookoff.py", line 289, in demo
 
177
  File "cookoff.py", line 310, in demo
177
178
    return txt.format(**vars)
178
179
KeyError: 'universe'
179
180
</code></pre></td></tr>
191
192
I don't know how to loop.</code></pre></td><td><pre><code>Traceback (most recent call last):
192
193
  File "cookoff.py", line 70, in method_result
193
194
    result = method(data)
194
 
  File "cookoff.py", line 281, in demo
 
195
  File "cookoff.py", line 302, in demo
195
196
    return template.substitute(**vars)
196
197
  File "/usr/lib64/python2.6/string.py", line 172, in substitute
197
198
    return self.pattern.sub(convert, self.template)