| 1 |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> |
|---|
| 2 |
<html lang="en"> |
|---|
| 3 |
<head> |
|---|
| 4 |
<meta http-equiv="content-type" content="text/html; charset=utf-8" /> |
|---|
| 5 |
<meta name="robots" content="NONE,NOARCHIVE" /> |
|---|
| 6 |
<title>TypeError at /databrowse/</title> |
|---|
| 7 |
<style type="text/css"> |
|---|
| 8 |
html * { padding:0; margin:0; } |
|---|
| 9 |
body * { padding:10px 20px; } |
|---|
| 10 |
body * * { padding:0; } |
|---|
| 11 |
body { font:small sans-serif; } |
|---|
| 12 |
body>div { border-bottom:1px solid #ddd; } |
|---|
| 13 |
h1 { font-weight:normal; } |
|---|
| 14 |
h2 { margin-bottom:.8em; } |
|---|
| 15 |
h2 span { font-size:80%; color:#666; font-weight:normal; } |
|---|
| 16 |
h3 { margin:1em 0 .5em 0; } |
|---|
| 17 |
h4 { margin:0 0 .5em 0; font-weight: normal; } |
|---|
| 18 |
table { border:1px solid #ccc; border-collapse: collapse; width:100%; background:white; } |
|---|
| 19 |
tbody td, tbody th { vertical-align:top; padding:2px 3px; } |
|---|
| 20 |
thead th { padding:1px 6px 1px 3px; background:#fefefe; text-align:left; font-weight:normal; font-size:11px; border:1px solid #ddd; } |
|---|
| 21 |
tbody th { width:12em; text-align:right; color:#666; padding-right:.5em; } |
|---|
| 22 |
table.vars { margin:5px 0 2px 40px; } |
|---|
| 23 |
table.vars td, table.req td { font-family:monospace; } |
|---|
| 24 |
table td.code { width:100%; } |
|---|
| 25 |
table td.code div { overflow:hidden; } |
|---|
| 26 |
table.source th { color:#666; } |
|---|
| 27 |
table.source td { font-family:monospace; white-space:pre; border-bottom:1px solid #eee; } |
|---|
| 28 |
ul.traceback { list-style-type:none; } |
|---|
| 29 |
ul.traceback li.frame { margin-bottom:1em; } |
|---|
| 30 |
div.context { margin: 10px 0; } |
|---|
| 31 |
div.context ol { padding-left:30px; margin:0 10px; list-style-position: inside; } |
|---|
| 32 |
div.context ol li { font-family:monospace; white-space:pre; color:#666; cursor:pointer; } |
|---|
| 33 |
div.context ol.context-line li { color:black; background-color:#ccc; } |
|---|
| 34 |
div.context ol.context-line li span { float: right; } |
|---|
| 35 |
div.commands { margin-left: 40px; } |
|---|
| 36 |
div.commands a { color:black; text-decoration:none; } |
|---|
| 37 |
#summary { background: #ffc; } |
|---|
| 38 |
#summary h2 { font-weight: normal; color: #666; } |
|---|
| 39 |
#explanation { background:#eee; } |
|---|
| 40 |
#template, #template-not-exist { background:#f6f6f6; } |
|---|
| 41 |
#template-not-exist ul { margin: 0 0 0 20px; } |
|---|
| 42 |
#traceback { background:#eee; } |
|---|
| 43 |
#requestinfo { background:#f6f6f6; padding-left:120px; } |
|---|
| 44 |
#summary table { border:none; background:transparent; } |
|---|
| 45 |
#requestinfo h2, #requestinfo h3 { position:relative; margin-left:-100px; } |
|---|
| 46 |
#requestinfo h3 { margin-bottom:-1em; } |
|---|
| 47 |
.error { background: #ffc; } |
|---|
| 48 |
.specific { color:#cc3300; font-weight:bold; } |
|---|
| 49 |
</style> |
|---|
| 50 |
<script type="text/javascript"> |
|---|
| 51 |
//<!-- |
|---|
| 52 |
function getElementsByClassName(oElm, strTagName, strClassName){ |
|---|
| 53 |
// Written by Jonathan Snook, http://www.snook.ca/jon; Add-ons by Robert Nyman, http://www.robertnyman.com |
|---|
| 54 |
var arrElements = (strTagName == "*" && document.all)? document.all : |
|---|
| 55 |
oElm.getElementsByTagName(strTagName); |
|---|
| 56 |
var arrReturnElements = new Array(); |
|---|
| 57 |
strClassName = strClassName.replace(/\-/g, "\-"); |
|---|
| 58 |
var oRegExp = new RegExp("(^|\s)" + strClassName + "(\s|$)"); |
|---|
| 59 |
var oElement; |
|---|
| 60 |
for(var i=0; i<arrElements.length; i++){ |
|---|
| 61 |
oElement = arrElements[i]; |
|---|
| 62 |
if(oRegExp.test(oElement.className)){ |
|---|
| 63 |
arrReturnElements.push(oElement); |
|---|
| 64 |
} |
|---|
| 65 |
} |
|---|
| 66 |
return (arrReturnElements) |
|---|
| 67 |
} |
|---|
| 68 |
function hideAll(elems) { |
|---|
| 69 |
for (var e = 0; e < elems.length; e++) { |
|---|
| 70 |
elems[e].style.display = 'none'; |
|---|
| 71 |
} |
|---|
| 72 |
} |
|---|
| 73 |
window.onload = function() { |
|---|
| 74 |
hideAll(getElementsByClassName(document, 'table', 'vars')); |
|---|
| 75 |
hideAll(getElementsByClassName(document, 'ol', 'pre-context')); |
|---|
| 76 |
hideAll(getElementsByClassName(document, 'ol', 'post-context')); |
|---|
| 77 |
hideAll(getElementsByClassName(document, 'div', 'pastebin')); |
|---|
| 78 |
} |
|---|
| 79 |
function toggle() { |
|---|
| 80 |
for (var i = 0; i < arguments.length; i++) { |
|---|
| 81 |
var e = document.getElementById(arguments[i]); |
|---|
| 82 |
if (e) { |
|---|
| 83 |
e.style.display = e.style.display == 'none' ? 'block' : 'none'; |
|---|
| 84 |
} |
|---|
| 85 |
} |
|---|
| 86 |
return false; |
|---|
| 87 |
} |
|---|
| 88 |
function varToggle(link, id) { |
|---|
| 89 |
toggle('v' + id); |
|---|
| 90 |
var s = link.getElementsByTagName('span')[0]; |
|---|
| 91 |
var uarr = String.fromCharCode(0x25b6); |
|---|
| 92 |
var darr = String.fromCharCode(0x25bc); |
|---|
| 93 |
s.innerHTML = s.innerHTML == uarr ? darr : uarr; |
|---|
| 94 |
return false; |
|---|
| 95 |
} |
|---|
| 96 |
function switchPastebinFriendly(link) { |
|---|
| 97 |
s1 = "Switch to copy-and-paste view"; |
|---|
| 98 |
s2 = "Switch back to interactive view"; |
|---|
| 99 |
link.innerHTML = link.innerHTML == s1 ? s2 : s1; |
|---|
| 100 |
toggle('browserTraceback', 'pastebinTraceback'); |
|---|
| 101 |
return false; |
|---|
| 102 |
} |
|---|
| 103 |
//--> |
|---|
| 104 |
</script> |
|---|
| 105 |
</head> |
|---|
| 106 |
<body> |
|---|
| 107 |
|
|---|
| 108 |
<div id="summary"> |
|---|
| 109 |
<h1>TypeError at /databrowse/</h1> |
|---|
| 110 |
<h2>coercing to Unicode: need string or buffer, __proxy__ found</h2> |
|---|
| 111 |
<table class="meta"> |
|---|
| 112 |
<tr> |
|---|
| 113 |
<th>Request Method:</th> |
|---|
| 114 |
<td>GET</td> |
|---|
| 115 |
</tr> |
|---|
| 116 |
<tr> |
|---|
| 117 |
<th>Request URL:</th> |
|---|
| 118 |
<td>http://bitprophet.dyndns.org:8080/databrowse/</td> |
|---|
| 119 |
</tr> |
|---|
| 120 |
<tr> |
|---|
| 121 |
<th>Exception Type:</th> |
|---|
| 122 |
<td>TypeError</td> |
|---|
| 123 |
</tr> |
|---|
| 124 |
<tr> |
|---|
| 125 |
<th>Exception Value:</th> |
|---|
| 126 |
<td>coercing to Unicode: need string or buffer, __proxy__ found</td> |
|---|
| 127 |
</tr> |
|---|
| 128 |
<tr> |
|---|
| 129 |
<th>Exception Location:</th> |
|---|
| 130 |
<td>/usr/lib/python2.5/site-packages/django/utils/encoding.py in force_unicode, line 38</td> |
|---|
| 131 |
</tr> |
|---|
| 132 |
<tr> |
|---|
| 133 |
<th>Python Executable:</th> |
|---|
| 134 |
<td>/usr/bin/python</td> |
|---|
| 135 |
</tr> |
|---|
| 136 |
<tr> |
|---|
| 137 |
<th>Python Version:</th> |
|---|
| 138 |
<td>2.5.0</td> |
|---|
| 139 |
</tr> |
|---|
| 140 |
</table> |
|---|
| 141 |
</div> |
|---|
| 142 |
|
|---|
| 143 |
|
|---|
| 144 |
<div id="template"> |
|---|
| 145 |
<h2>Template error</h2> |
|---|
| 146 |
<p>In template <code>/usr/lib/python2.5/site-packages/django/contrib/databrowse/templates/databrowse/homepage.html</code>, error at line <strong>9</strong></p> |
|---|
| 147 |
<h3>Caught an exception while rendering: coercing to Unicode: need string or buffer, __proxy__ found</h3> |
|---|
| 148 |
<table class="source cut-top cut-bottom"> |
|---|
| 149 |
|
|---|
| 150 |
|
|---|
| 151 |
<tr><th>1</th> |
|---|
| 152 |
<td>{% extends "databrowse/base.html" %} |
|---|
| 153 |
</td></tr> |
|---|
| 154 |
|
|---|
| 155 |
|
|---|
| 156 |
|
|---|
| 157 |
<tr><th>2</th> |
|---|
| 158 |
<td> |
|---|
| 159 |
</td></tr> |
|---|
| 160 |
|
|---|
| 161 |
|
|---|
| 162 |
|
|---|
| 163 |
<tr><th>3</th> |
|---|
| 164 |
<td>{% block title %}Databrowse{% endblock %} |
|---|
| 165 |
</td></tr> |
|---|
| 166 |
|
|---|
| 167 |
|
|---|
| 168 |
|
|---|
| 169 |
<tr><th>4</th> |
|---|
| 170 |
<td> |
|---|
| 171 |
</td></tr> |
|---|
| 172 |
|
|---|
| 173 |
|
|---|
| 174 |
|
|---|
| 175 |
<tr><th>5</th> |
|---|
| 176 |
<td>{% block bodyid %}homepage{% endblock %} |
|---|
| 177 |
</td></tr> |
|---|
| 178 |
|
|---|
| 179 |
|
|---|
| 180 |
|
|---|
| 181 |
<tr><th>6</th> |
|---|
| 182 |
<td> |
|---|
| 183 |
</td></tr> |
|---|
| 184 |
|
|---|
| 185 |
|
|---|
| 186 |
|
|---|
| 187 |
<tr><th>7</th> |
|---|
| 188 |
<td>{% block content %} |
|---|
| 189 |
</td></tr> |
|---|
| 190 |
|
|---|
| 191 |
|
|---|
| 192 |
|
|---|
| 193 |
<tr><th>8</th> |
|---|
| 194 |
<td> |
|---|
| 195 |
</td></tr> |
|---|
| 196 |
|
|---|
| 197 |
|
|---|
| 198 |
|
|---|
| 199 |
<tr class="error"><th>9</th> |
|---|
| 200 |
<td><span class="specific">{% for model in model_list %}</span> |
|---|
| 201 |
</td></tr> |
|---|
| 202 |
|
|---|
| 203 |
|
|---|
| 204 |
|
|---|
| 205 |
<tr><th>10</th> |
|---|
| 206 |
<td> <div class="modelgroup {% cycle even,odd %}"> |
|---|
| 207 |
</td></tr> |
|---|
| 208 |
|
|---|
| 209 |
|
|---|
| 210 |
|
|---|
| 211 |
<tr><th>11</th> |
|---|
| 212 |
<td> <h2><a href="{{ model.url }}">{{ model.verbose_name_plural|capfirst }}</a></h2> |
|---|
| 213 |
</td></tr> |
|---|
| 214 |
|
|---|
| 215 |
|
|---|
| 216 |
|
|---|
| 217 |
<tr><th>12</th> |
|---|
| 218 |
<td> <p> |
|---|
| 219 |
</td></tr> |
|---|
| 220 |
|
|---|
| 221 |
|
|---|
| 222 |
|
|---|
| 223 |
<tr><th>13</th> |
|---|
| 224 |
<td> {% for object in model.sample_objects %} |
|---|
| 225 |
</td></tr> |
|---|
| 226 |
|
|---|
| 227 |
|
|---|
| 228 |
|
|---|
| 229 |
<tr><th>14</th> |
|---|
| 230 |
<td> <a href="{{ object.url }}">{{ object }}</a>, |
|---|
| 231 |
</td></tr> |
|---|
| 232 |
|
|---|
| 233 |
|
|---|
| 234 |
|
|---|
| 235 |
<tr><th>15</th> |
|---|
| 236 |
<td> {% endfor %} |
|---|
| 237 |
</td></tr> |
|---|
| 238 |
|
|---|
| 239 |
|
|---|
| 240 |
|
|---|
| 241 |
<tr><th>16</th> |
|---|
| 242 |
<td> <a class="more" href="{{ model.url }}">More &rarr;</a> |
|---|
| 243 |
</td></tr> |
|---|
| 244 |
|
|---|
| 245 |
|
|---|
| 246 |
|
|---|
| 247 |
<tr><th>17</th> |
|---|
| 248 |
<td> </p> |
|---|
| 249 |
</td></tr> |
|---|
| 250 |
|
|---|
| 251 |
|
|---|
| 252 |
|
|---|
| 253 |
<tr><th>18</th> |
|---|
| 254 |
<td> </div> |
|---|
| 255 |
</td></tr> |
|---|
| 256 |
|
|---|
| 257 |
|
|---|
| 258 |
|
|---|
| 259 |
<tr><th>19</th> |
|---|
| 260 |
<td>{% endfor %} |
|---|
| 261 |
</td></tr> |
|---|
| 262 |
|
|---|
| 263 |
|
|---|
| 264 |
</table> |
|---|
| 265 |
</div> |
|---|
| 266 |
|
|---|
| 267 |
<div id="traceback"> |
|---|
| 268 |
<h2>Traceback <span>(innermost last)</span></h2> |
|---|
| 269 |
<div class="commands"><a href="#" onclick="return switchPastebinFriendly(this);">Switch to copy-and-paste view</a></div> |
|---|
| 270 |
<br/> |
|---|
| 271 |
<div id="browserTraceback"> |
|---|
| 272 |
<ul class="traceback"> |
|---|
| 273 |
|
|---|
| 274 |
<li class="frame"> |
|---|
| 275 |
<code>/usr/lib/python2.5/site-packages/django/template/__init__.py</code> in <code>render_node</code> |
|---|
| 276 |
|
|---|
| 277 |
|
|---|
| 278 |
<div class="context" id="c154975044"> |
|---|
| 279 |
|
|---|
| 280 |
<ol start="747" class="pre-context" id="pre154975044"><li onclick="toggle('pre154975044', 'post154975044')"></li><li onclick="toggle('pre154975044', 'post154975044')"> def render_node(self, node, context):</li><li onclick="toggle('pre154975044', 'post154975044')"> return node.render(context)</li><li onclick="toggle('pre154975044', 'post154975044')"></li><li onclick="toggle('pre154975044', 'post154975044')">class DebugNodeList(NodeList):</li><li onclick="toggle('pre154975044', 'post154975044')"> def render_node(self, node, context):</li><li onclick="toggle('pre154975044', 'post154975044')"> try:</li></ol> |
|---|
| 281 |
|
|---|
| 282 |
<ol start="754" class="context-line"><li onclick="toggle('pre154975044', 'post154975044')"> result = node.render(context) <span>...</span></li></ol> |
|---|
| 283 |
|
|---|
| 284 |
<ol start='755' class="post-context" id="post154975044"><li onclick="toggle('pre154975044', 'post154975044')"> except TemplateSyntaxError, e:</li><li onclick="toggle('pre154975044', 'post154975044')"> if not hasattr(e, 'source'):</li><li onclick="toggle('pre154975044', 'post154975044')"> e.source = node.source</li><li onclick="toggle('pre154975044', 'post154975044')"> raise</li><li onclick="toggle('pre154975044', 'post154975044')"> except Exception, e:</li><li onclick="toggle('pre154975044', 'post154975044')"> from sys import exc_info</li></ol> |
|---|
| 285 |
|
|---|
| 286 |
</div> |
|---|
| 287 |
|
|---|
| 288 |
|
|---|
| 289 |
|
|---|
| 290 |
<div class="commands"> |
|---|
| 291 |
<a href="#" onclick="return varToggle(this, '154975044')"><span>▶</span> Local vars</a> |
|---|
| 292 |
</div> |
|---|
| 293 |
<table class="vars" id="v154975044"> |
|---|
| 294 |
<thead> |
|---|
| 295 |
<tr> |
|---|
| 296 |
<th>Variable</th> |
|---|
| 297 |
<th>Value</th> |
|---|
| 298 |
</tr> |
|---|
| 299 |
</thead> |
|---|
| 300 |
<tbody> |
|---|
| 301 |
|
|---|
| 302 |
<tr> |
|---|
| 303 |
<td>context</td> |
|---|
| 304 |
<td class="code"><div>[{'forloop': {'parentloop': {}, 'last': False, 'counter': 2, 'revcounter0': 1, 'revcounter': 2, 'counter0': 1, 'first': False}, u'model': <EasyModel for Job>}, {'block': <Block Node: content. Contents: [<Text Node: ' |
|---|
| 305 |
|
|---|
| 306 |
'>, <For Node: for model in model_list, tail_len: 11>, <Text Node: ' |
|---|
| 307 |
|
|---|
| 308 |
'>]>}, {'root_url': u'/databrowse/', 'model_list': [<EasyModel for Person>, <EasyModel for Job>, <EasyModel for Company>]}]</div></td> |
|---|
| 309 |
</tr> |
|---|
| 310 |
|
|---|
| 311 |
<tr> |
|---|
| 312 |
<td>e</td> |
|---|
| 313 |
<td class="code"><div>TypeError('coercing to Unicode: need string or buffer, __proxy__ found',)</div></td> |
|---|
| 314 |
</tr> |
|---|
| 315 |
|
|---|
| 316 |
<tr> |
|---|
| 317 |
<td>exc_info</td> |
|---|
| 318 |
<td class="code"><div><built-in function exc_info></div></td> |
|---|
| 319 |
</tr> |
|---|
| 320 |
|
|---|
| 321 |
<tr> |
|---|
| 322 |
<td>node</td> |
|---|
| 323 |
<td class="code"><div><For Node: for model in model_list, tail_len: 11></div></td> |
|---|
| 324 |
</tr> |
|---|
| 325 |
|
|---|
| 326 |
<tr> |
|---|
| 327 |
<td>self</td> |
|---|
| 328 |
<td class="code"><div>[<Text Node: ' |
|---|
| 329 |
|
|---|
| 330 |
'>, |
|---|
| 331 |
<For Node: for model in model_list, tail_len: 11>, |
|---|
| 332 |
<Text Node: ' |
|---|
| 333 |
|
|---|
| 334 |
'>]</div></td> |
|---|
| 335 |
</tr> |
|---|
| 336 |
|
|---|
| 337 |
<tr> |
|---|
| 338 |
<td>wrapped</td> |
|---|
| 339 |
<td class="code"><div>TemplateSyntaxError('Caught an exception while rendering: coercing to Unicode: need string or buffer, __proxy__ found',)</div></td> |
|---|
| 340 |
</tr> |
|---|
| 341 |
|
|---|
| 342 |
</tbody> |
|---|
| 343 |
</table> |
|---|
| 344 |
|
|---|
| 345 |
</li> |
|---|
| 346 |
|
|---|
| 347 |
<li class="frame"> |
|---|
| 348 |
<code>/usr/lib/python2.5/site-packages/django/template/defaulttags.py</code> in <code>render</code> |
|---|
| 349 |
|
|---|
| 350 |
|
|---|
| 351 |
<div class="context" id="c154975004"> |
|---|
| 352 |
|
|---|
| 353 |
<ol start="127" class="pre-context" id="pre154975004"><li onclick="toggle('pre154975004', 'post154975004')"> }</li><li onclick="toggle('pre154975004', 'post154975004')"> if unpack:</li><li onclick="toggle('pre154975004', 'post154975004')"> # If there are multiple loop variables, unpack the item into them.</li><li onclick="toggle('pre154975004', 'post154975004')"> context.update(dict(zip(self.loopvars, item)))</li><li onclick="toggle('pre154975004', 'post154975004')"> else:</li><li onclick="toggle('pre154975004', 'post154975004')"> context[self.loopvars[0]] = item</li><li onclick="toggle('pre154975004', 'post154975004')"> for node in self.nodelist_loop:</li></ol> |
|---|
| 354 |
|
|---|
| 355 |
<ol start="134" class="context-line"><li onclick="toggle('pre154975004', 'post154975004')"> nodelist.append(node.render(context)) <span>...</span></li></ol> |
|---|
| 356 |
|
|---|
| 357 |
<ol start='135' class="post-context" id="post154975004"><li onclick="toggle('pre154975004', 'post154975004')"> if unpack:</li><li onclick="toggle('pre154975004', 'post154975004')"> # The loop variables were pushed on to the context so pop them</li><li onclick="toggle('pre154975004', 'post154975004')"> # off again. This is necessary because the tag lets the length</li><li onclick="toggle('pre154975004', 'post154975004')"> # of loopvars differ to the length of each set of items and we</li><li onclick="toggle('pre154975004', 'post154975004')"> # don't want to leave any vars from the previous loop on the</li><li onclick="toggle('pre154975004', 'post154975004')"> # context.</li></ol> |
|---|
| 358 |
|
|---|
| 359 |
</div> |
|---|
| 360 |
|
|---|
| 361 |
|
|---|
| 362 |
|
|---|
| 363 |
<div class="commands"> |
|---|
| 364 |
<a href="#" onclick="return varToggle(this, '154975004')"><span>▶</span> Local vars</a> |
|---|
| 365 |
</div> |
|---|
| 366 |
<table class="vars" id="v154975004"> |
|---|
| 367 |
<thead> |
|---|
| 368 |
<tr> |
|---|
| 369 |
<th>Variable</th> |
|---|
| 370 |
<th>Value</th> |
|---|
| 371 |
</tr> |
|---|
| 372 |
</thead> |
|---|
| 373 |
<tbody> |
|---|
| 374 |
|
|---|
| 375 |
<tr> |
|---|
| 376 |
<td>context</td> |
|---|
| 377 |
<td class="code"><div>[{'forloop': {'parentloop': {}, 'last': False, 'counter': 2, 'revcounter0': 1, 'revcounter': 2, 'counter0': 1, 'first': False}, u'model': <EasyModel for Job>}, {'block': <Block Node: content. Contents: [<Text Node: ' |
|---|
| 378 |
|
|---|
| 379 |
'>, <For Node: for model in model_list, tail_len: 11>, <Text Node: ' |
|---|
| 380 |
|
|---|
| 381 |
'>]>}, {'root_url': u'/databrowse/', 'model_list': [<EasyModel for Person>, <EasyModel for Job>, <EasyModel for Company>]}]</div></td> |
|---|
| 382 |
</tr> |
|---|
| 383 |
|
|---|
| 384 |
<tr> |
|---|
| 385 |
<td>i</td> |
|---|
| 386 |
<td class="code"><div>1</div></td> |
|---|
| 387 |
</tr> |
|---|
| 388 |
|
|---|
| 389 |
<tr> |
|---|
| 390 |
<td>item</td> |
|---|
| 391 |
<td class="code"><div><EasyModel for Job></div></td> |
|---|
| 392 |
</tr> |
|---|
| 393 |
|
|---|
| 394 |
<tr> |
|---|
| 395 |
<td>len_values</td> |
|---|
| 396 |
<td class="code"><div>3</div></td> |
|---|
| 397 |
</tr> |
|---|
| 398 |
|
|---|
| 399 |
<tr> |
|---|
| 400 |
<td>node</td> |
|---|
| 401 |
<td class="code"><div><Variable Node: model.verbose_name_plural|capfirst></div></td> |
|---|
| 402 |
</tr> |
|---|
| 403 |
|
|---|
| 404 |
<tr> |
|---|
| 405 |
<td>nodelist</td> |
|---|
| 406 |
<td class="code"><div>[u'\n <div class="modelgroup ', |
|---|
| 407 |
u'even', |
|---|
| 408 |
u'">\n\t <h2><a href="', |
|---|
| 409 |
u'/databrowse/jobs/person/', |
|---|
| 410 |
u'">', |
|---|
| 411 |
u'People', |
|---|
| 412 |
u'</a></h2>\n\t\t<p>\n\t\t', |
|---|
| 413 |
'', |
|---|
| 414 |
u'\n\t\t\t<a class="more" href="', |
|---|
| 415 |
u'/databrowse/jobs/person/', |
|---|
| 416 |
u'">More &rarr;</a>\n\t\t</p>\n </div>\n', |
|---|
| 417 |
u'\n <div class="modelgroup ', |
|---|
| 418 |
u'odd', |
|---|
| 419 |
u'">\n\t <h2><a href="', |
|---|
| 420 |
u'/databrowse/jobs/job/', |
|---|
| 421 |
u'">']</div></td> |
|---|
| 422 |
</tr> |
|---|
| 423 |
|
|---|
| 424 |
<tr> |
|---|
| 425 |
<td>parentloop</td> |
|---|
| 426 |
<td class="code"><div>{}</div></td> |
|---|
| 427 |
</tr> |
|---|
| 428 |
|
|---|
| 429 |
<tr> |
|---|
| 430 |
<td>self</td> |
|---|
| 431 |
<td class="code"><div><For Node: for model in model_list, tail_len: 11></div></td> |
|---|
| 432 |
</tr> |
|---|
| 433 |
|
|---|
| 434 |
<tr> |
|---|
| 435 |
<td>unpack</td> |
|---|
| 436 |
<td class="code"><div>False</div></td> |
|---|
| 437 |
</tr> |
|---|
| 438 |
|
|---|
| 439 |
<tr> |
|---|
| 440 |
<td>values</td> |
|---|
| 441 |
<td class="code"><div>[<EasyModel for Person>, <EasyModel for Job>, <EasyModel for Company>]</div></td> |
|---|
| 442 |
</tr> |
|---|
| 443 |
|
|---|
| 444 |
</tbody> |
|---|
| 445 |
</table> |
|---|
| 446 |
|
|---|
| 447 |
</li> |
|---|
| 448 |
|
|---|
| 449 |
<li class="frame"> |
|---|
| 450 |
<code>/usr/lib/python2.5/site-packages/django/template/__init__.py</code> in <code>render</code> |
|---|
| 451 |
|
|---|
| 452 |
|
|---|
| 453 |
<div class="context" id="c154974964"> |
|---|
| 454 |
|
|---|
| 455 |
<ol start="783" class="pre-context" id="pre154974964"><li onclick="toggle('pre154974964', 'post154974964')"></li><li onclick="toggle('pre154974964', 'post154974964')"> def render(self, context):</li><li onclick="toggle('pre154974964', 'post154974964')"> return self.filter_expression.resolve(context)</li><li onclick="toggle('pre154974964', 'post154974964')"></li><li onclick="toggle('pre154974964', 'post154974964')">class DebugVariableNode(VariableNode):</li><li onclick="toggle('pre154974964', 'post154974964')"> def render(self, context):</li><li onclick="toggle('pre154974964', 'post154974964')"> try:</li></ol> |
|---|
| 456 |
|
|---|
| 457 |
<ol start="790" class="context-line"><li onclick="toggle('pre154974964', 'post154974964')"> return self.filter_expression.resolve(context) <span>...</span></li></ol> |
|---|
| 458 |
|
|---|
| 459 |
<ol start='791' class="post-context" id="post154974964"><li onclick="toggle('pre154974964', 'post154974964')"> except TemplateSyntaxError, e:</li><li onclick="toggle('pre154974964', 'post154974964')"> if not hasattr(e, 'source'):</li><li onclick="toggle('pre154974964', 'post154974964')"> e.source = self.source</li><li onclick="toggle('pre154974964', 'post154974964')"> raise</li><li onclick="toggle('pre154974964', 'post154974964')"></li><li onclick="toggle('pre154974964', 'post154974964')">def generic_tag_compiler(params, defaults, name, node_class, parser, token):</li></ol> |
|---|
| 460 |
|
|---|
| 461 |
</div> |
|---|
| 462 |
|
|---|
| 463 |
|
|---|
| 464 |
|
|---|
| 465 |
<div class="commands"> |
|---|
| 466 |
<a href="#" onclick="return varToggle(this, '154974964')"><span>▶</span> Local vars</a> |
|---|
| 467 |
</div> |
|---|
| 468 |
<table class="vars" id="v154974964"> |
|---|
| 469 |
<thead> |
|---|
| 470 |
<tr> |
|---|
| 471 |
<th>Variable</th> |
|---|
| 472 |
<th>Value</th> |
|---|
| 473 |
</tr> |
|---|
| 474 |
</thead> |
|---|
| 475 |
<tbody> |
|---|
| 476 |
|
|---|
| 477 |
<tr> |
|---|
| 478 |
<td>context</td> |
|---|
| 479 |
<td class="code"><div>[{'forloop': {'parentloop': {}, 'last': False, 'counter': 2, 'revcounter0': 1, 'revcounter': 2, 'counter0': 1, 'first': False}, u'model': <EasyModel for Job>}, {'block': <Block Node: content. Contents: [<Text Node: ' |
|---|
| 480 |
|
|---|
| 481 |
'>, <For Node: for model in model_list, tail_len: 11>, <Text Node: ' |
|---|
| 482 |
|
|---|
| 483 |
'>]>}, {'root_url': u'/databrowse/', 'model_list': [<EasyModel for Person>, <EasyModel for Job>, <EasyModel for Company>]}]</div></td> |
|---|
| 484 |
</tr> |
|---|
| 485 |
|
|---|
| 486 |
<tr> |
|---|
| 487 |
<td>self</td> |
|---|
| 488 |
<td class="code"><div><Variable Node: model.verbose_name_plural|capfirst></div></td> |
|---|
| 489 |
</tr> |
|---|
| 490 |
|
|---|
| 491 |
</tbody> |
|---|
| 492 |
</table> |
|---|
| 493 |
|
|---|
| 494 |
</li> |
|---|
| 495 |
|
|---|
| 496 |
<li class="frame"> |
|---|
| 497 |
<code>/usr/lib/python2.5/site-packages/django/template/__init__.py</code> in <code>resolve</code> |
|---|
| 498 |
|
|---|
| 499 |
|
|---|
| 500 |
<div class="context" id="c154974164"> |
|---|
| 501 |
|
|---|
| 502 |
<ol start="575" class="pre-context" id="pre154974164"><li onclick="toggle('pre154974164', 'post154974164')"> upto = match.end()</li><li onclick="toggle('pre154974164', 'post154974164')"> if upto != len(token):</li><li onclick="toggle('pre154974164', 'post154974164')"> raise TemplateSyntaxError, "Could not parse the remainder: '%s' from '%s'" % (token[upto:], token)</li><li onclick="toggle('pre154974164', 'post154974164')"> self.var, self.filters = var, filters</li><li onclick="toggle('pre154974164', 'post154974164')"></li><li onclick="toggle('pre154974164', 'post154974164')"> def resolve(self, context, ignore_failures=False):</li><li onclick="toggle('pre154974164', 'post154974164')"> try:</li></ol> |
|---|
| 503 |
|
|---|
| 504 |
<ol start="582" class="context-line"><li onclick="toggle('pre154974164', 'post154974164')"> obj = resolve_variable(self.var, context) <span>...</span></li></ol> |
|---|
| 505 |
|
|---|
| 506 |
<ol start='583' class="post-context" id="post154974164"><li onclick="toggle('pre154974164', 'post154974164')"> except VariableDoesNotExist:</li><li onclick="toggle('pre154974164', 'post154974164')"> if ignore_failures:</li><li onclick="toggle('pre154974164', 'post154974164')"> obj = None</li><li onclick="toggle('pre154974164', 'post154974164')"> else:</li><li onclick="toggle('pre154974164', 'post154974164')"> if settings.TEMPLATE_STRING_IF_INVALID:</li><li onclick="toggle('pre154974164', 'post154974164')"> global invalid_var_format_string</li></ol> |
|---|
| 507 |
|
|---|
| 508 |
</div> |
|---|
| 509 |
|
|---|
| 510 |
|
|---|
| 511 |
|
|---|
| 512 |
<div class="commands"> |
|---|
| 513 |
<a href="#" onclick="return varToggle(this, '154974164')"><span>▶</span> Local vars</a> |
|---|
| 514 |
</div> |
|---|
| 515 |
<table class="vars" id="v154974164"> |
|---|
| 516 |
<thead> |
|---|
| 517 |
<tr> |
|---|
| 518 |
<th>Variable</th> |
|---|
| 519 |
<th>Value</th> |
|---|
| 520 |
</tr> |
|---|
| 521 |
</thead> |
|---|
| 522 |
<tbody> |
|---|
| 523 |
|
|---|
| 524 |
<tr> |
|---|
| 525 |
<td>context</td> |
|---|
| 526 |
<td class="code"><div>[{'forloop' |
|---|