-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtreebeard-error.html
More file actions
362 lines (324 loc) · 17 KB
/
treebeard-error.html
File metadata and controls
362 lines (324 loc) · 17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
<!DOCTYPE html>
<!--[if IE 8 ]><html class="ie ie8" lang="ru"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!-->
<html lang="ru">
<!--<![endif]-->
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="author" content="Косолапов Дмитрий">
<meta name="google-site-verification" content="yJ35ns77j5pUPUutyBdAd5CwjqK3TGn5prTlyf2LlSo">
<title>Косолапов Дмитрий: мысли умные и не только. - treebeard выдало сообщение об ошибке</title>
<link href="https://dicos.ru/feeds/all.atom.xml" type="application/atom+xml" rel="alternate" title="Косолапов Дмитрий: мысли умные и не только. Full Atom Feed" />
<link href="https://dicos.ru/feeds/all.rss.xml" type="application/rss+xml" rel="alternate" title="Косолапов Дмитрий: мысли умные и не только. Full RSS Feed" />
<!-- CSS -->
<link rel="stylesheet" href="https://dicos.ru/theme/css/style.css">
<!-- Custom CSS -->
<link rel="stylesheet" href="https://dicos.ru/theme/css/colors/blue.css" id="colors">
<!-- Code highlight color scheme -->
<link href="https://dicos.ru/theme/css/code_blocks/darkly.css" rel="stylesheet">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
<script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->
<meta property="og:locale" content="">
<meta property="og:site_name" content="Косолапов Дмитрий: мысли умные и не только.">
<meta property="og:type" content="article">
<meta property="article:author" content="">
<meta property="og:url" content="https://dicos.ru/treebeard-error.html">
<meta property="og:title" content="treebeard выдало сообщение об ошибке">
<meta property="og:description" content="">
<meta property="og:image" content="https://dicos.ru/images/guilherme-toti.jpg">
<meta property="article:published_time" content="2010-04-25 22:58:00+07:00">
</head>
<body>
<header id="header">
<!-- Container -->
<div class="container">
<!-- Logo / Mobile Menu -->
<div class="nine.columns columns">
<div id="logo">
<h1><a href="https://dicos.ru/">Косолапов Дмитрий: мысли умные и не только.</a></h1>
</div>
</div>
<!-- Navigation
================================================== -->
<div class="seven columns">
<nav id="navigation" class="menu">
<ul id="responsive">
<li><a href="https://dicos.ru/">Главная</a></li>
<li><a href="https://dicos.ru/about.html">Обо мне</a></li>
</ul>
</nav>
</div>
</div>
<!-- Container / End -->
</header>
<!-- Header / End -->
<div id="content-wrapper">
<section id="titlebar">
<!-- Container -->
<div class="container">
<div class="sixteen columns">
<nav id="breadcrumbs">
<ul>
<li>Текущее нахождение:</li>
<li><a href="https://dicos.ru/">Главная</a></li>
<li><a href="https://dicos.ru/category/python.html">python</a></li>
<li>treebeard выдало сообщение об ошибке</li>
</ul>
</nav>
</div>
</div>
<!-- Container / End -->
</section>
<div class="container">
<div class="twelve alt columns">
<article class="post" style="margin: 0; border: 0;">
<section class="post-content">
<header class="meta">
<h2><a href="https://dicos.ru/treebeard-error.html">treebeard выдало сообщение об ошибке</a></h2>
<ul>
<li>By <a href="https://dicos.ru/author/admin.html">admin</a></li>
<li>Вс 25 Апрель 2010</li>
</ul>
</header>
<p>После того, как я выложил на рабочий сервер свой проект, часть сайта,
доступная простым смертным работала нормально с тестовыми данными. Не
работала только закрытая часть, то есть админка. Вернее модуль,
позволяющий создавать страницы с текстом сообщал мне об ошибке.</p>
<blockquote>
<div class="line-block">
<div class="line">TemplateSyntaxError at /admin/pages/pages/</div>
<div class="line">Caught an exception while rendering: Failed lookup for key
[request] in u'[{\'action_index\': 0, \'block\': <Block Node:
result_list. Contents: [<Text Node: \'\n \'>, <If node>, <Text
Node: \'\n \'>, <django.template.SimpleNode object at
0x1327a890>, <Text Node: \'\n \'>, <If node>, <Text Node:
\'\n\'>]>}, {\'block\': <Block Node: content. Contents:
[<Text Node: \'\n <div id="content-main"\'>, <Block Node:
object-tools. Contents: [<Text Node: \'\n \'>, <If node>, <Text
Node: \'\n \'>]>, <Text Node: \'\n \'>, <If node>, <Text
Node: \'\n <div class="module\'>, <If node>, <Text Node: \'"
id="changelist">\n \'>, <Block Node: search. Contents:
[<django.template.InclusionNode object at 0x13243310>]>, <Text
Node: \'\n \'>, <Block Node: date_hierarchy. Contents:
[<django.template.InclusionNode object at 0x132430d0>]>, <Text
Node: \'\n\n \'>, <Block Node: filters. Contents: [<Text Node:
\'\n \'>, <If node>, <Text Node: \'\n \'>]>, <Text Node:
\'\n \n <form actio\'>, <If node>, <Text Node: \'>\n \'>,
<If node>, <Text Node: \'\n\n \'>, <Block Node: result_list.
Contents: [<Text Node: \'\n \'>, <If node>, <Text Node: \'\n
\'>, <django.template.SimpleNode object at 0x1327a890>, <Text
Node: \'\n \'>, <If node>, <Text Node: \'\n\'>]>, <Text
Node: \'\n \'>, <Block Node: pagination. Contents:
[<django.template.InclusionNode object at 0x13256a90>]>, <Text
Node: \'\n </form>\n </div>\'>]>}, {\'actions_on_bottom\':
False, \'cl\': <django.contrib.admin.views.main.ChangeList
object at 0x1324ec90>, \'has_add_permission\': True,
\'media\': <django.forms.widgets.Media object at 0x1327a450>,
\'root_path\': None, \'action_form\':
<django.contrib.admin.helpers.ActionForm object at 0x1327a6d0>,
\'actions_on_top\': True, \'app_label\': \'pages\',
\'is_popup\': False, \'title\':
u\'\\u0412\\u044b\\u0431\\u0435\\u0440\\u0438\\u0442\\u0435
pages \\u0434\\u043b\\u044f
\\u0438\\u0437\\u043c\\u0435\\u043d\\u0435\\u043d\\u0438\\u044f\'},
{\'this_url\': u\'/admin/pages/pages/\'}, {\'MEDIA_URL\':
\'/media/\'}, {\'LANGUAGES\': ((\'ar\', \'Arabic\'),
(\'bn\', \'Bengali\'), (\'bg\', \'Bulgarian\'), (\'ca\',
\'Catalan\'), (\'cs\', \'Czech\'), (\'cy\', \'Welsh\'),
(\'da\', \'Danish\'), (\'de\', \'German\'), (\'el\',
\'Greek\'), (\'en\', \'English\'), (\'es\',
\'Spanish\'), (\'et\', \'Estonian\'), (\'es-ar\',
\'Argentinean Spanish\'), (\'eu\', \'Basque\'), (\'fa\',
\'Persian\'), (\'fi\', \'Finnish\'), (\'fr\',
\'French\'), (\'ga\', \'Irish\'), (\'gl\',
\'Galician\'), (\'hu\', \'Hungarian\'), (\'he\',
\'Hebrew\'), (\'hi\', \'Hindi\'), (\'hr\',
\'Croatian\'), (\'is\', \'Icelandic\'), (\'it\',
\'Italian\'), (\'ja\', \'Japanese\'), (\'ka\',
\'Georgian\'), (\'ko\', \'Korean\'), (\'km\',
\'Khmer\'), (\'kn\', \'Kannada\'), (\'lv\',
\'Latvian\'), (\'lt\', \'Lithuanian\'), (\'mk\',
\'Macedonian\'), (\'nl\', \'Dutch\'), (\'no\',
\'Norwegian\'), (\'pl\', \'Polish\'), (\'pt\',
\'Portuguese\'), (\'pt-br\', \'Brazilian Portuguese\'),
(\'ro\', \'Romanian\'), (\'ru\', \'Russian\'), (\'sk\',
\'Slovak\'), (\'sl\', \'Slovenian\'), (\'sr\',
\'Serbian\'), (\'sv\', \'Swedish\'), (\'ta\',
\'Tamil\'), (\'te\', \'Telugu\'), (\'th\', \'Thai\'),
(\'tr\', \'Turkish\'), (\'uk\', \'Ukrainian\'),
(\'zh-cn\', \'Simplified Chinese\'), (\'zh-tw\',
\'Traditional Chinese\')), \'LANGUAGE_BIDI\': False,
\'LANGUAGE_CODE\': \'ru\'}, {}, {\'perms\':
<django.core.context_processors.PermWrapper object at
0x1327aa50>, \'messages\': [], \'user\': <User: root>}, {}]'</div>
<div class="line">Original Traceback (most recent call last):</div>
<div class="line">File "/usr/lib/python2.5/site-packages/django/template/debug.py",
line 71, in render_node</div>
<div class="line">result = node.render(context)</div>
<div class="line">File
"/usr/lib/python2.5/site-packages/django/template/__init__.py",
line 908, in render</div>
<div class="line">resolved_vars = [var.resolve(context) for var in
self.vars_to_resolve]</div>
<div class="line">File
"/usr/lib/python2.5/site-packages/django/template/__init__.py",
line 687, in resolve</div>
<div class="line">value = self._resolve_lookup(context)</div>
<div class="line">File
"/usr/lib/python2.5/site-packages/django/template/__init__.py",
line 740, in _resolve_lookup</div>
<div class="line">raise VariableDoesNotExist("Failed lookup for key [%s] in %r",
(bit, current)) # missing attribute</div>
<div class="line">VariableDoesNotExist: Failed lookup for key [request] in
u'[{\'action_index\': 0, \'block\': <Block Node:
result_list. Contents: [<Text Node: \'\n \'>, <If node>, <Text
Node: \'\n \'>, <django.template.SimpleNode object at
0x1327a890>, <Text Node: \'\n \'>, <If node>, <Text Node:
\'\n\'>]>}, {\'block\': <Block Node: content. Contents:
[<Text Node: \'\n <div id="content-main"\'>, <Block Node:
object-tools. Contents: [<Text Node: \'\n \'>, <If node>, <Text
Node: \'\n \'>]>, <Text Node: \'\n \'>, <If node>, <Text
Node: \'\n <div class="module\'>, <If node>, <Text Node: \'"
id="changelist">\n \'>, <Block Node: search. Contents:
[<django.template.InclusionNode object at 0x13243310>]>, <Text
Node: \'\n \'>, <Block Node: date_hierarchy. Contents:
[<django.template.InclusionNode object at 0x132430d0>]>, <Text
Node: \'\n\n \'>, <Block Node: filters. Contents: [<Text Node:
\'\n \'>, <If node>, <Text Node: \'\n \'>]>, <Text Node:
\'\n \n <form actio\'>, <If node>, <Text Node: \'>\n \'>,
<If node>, <Text Node: \'\n\n \'>, <Block Node: result_list.
Contents: [<Text Node: \'\n \'>, <If node>, <Text Node: \'\n
\'>, <django.template.SimpleNode object at 0x1327a890>, <Text
Node: \'\n \'>, <If node>, <Text Node: \'\n\'>]>, <Text
Node: \'\n \'>, <Block Node: pagination. Contents:
[<django.template.InclusionNode object at 0x13256a90>]>, <Text
Node: \'\n </form>\n </div>\'>]>}, {\'actions_on_bottom\':
False, \'cl\': <django.contrib.admin.views.main.ChangeList
object at 0x1324ec90>, \'has_add_permission\': True,
\'media\': <django.forms.widgets.Media object at 0x1327a450>,
\'root_path\': None, \'action_form\':
<django.contrib.admin.helpers.ActionForm object at 0x1327a6d0>,
\'actions_on_top\': True, \'app_label\': \'pages\',
\'is_popup\': False, \'title\':
u\'\\u0412\\u044b\\u0431\\u0435\\u0440\\u0438\\u0442\\u0435
pages \\u0434\\u043b\\u044f
\\u0438\\u0437\\u043c\\u0435\\u043d\\u0435\\u043d\\u0438\\u044f\'},
{\'this_url\': u\'/admin/pages/pages/\'}, {\'MEDIA_URL\':
\'/media/\'}, {\'LANGUAGES\': ((\'ar\', \'Arabic\'),
(\'bn\', \'Bengali\'), (\'bg\', \'Bulgarian\'), (\'ca\',
\'Catalan\'), (\'cs\', \'Czech\'), (\'cy\', \'Welsh\'),
(\'da\', \'Danish\'), (\'de\', \'German\'), (\'el\',
\'Greek\'), (\'en\', \'English\'), (\'es\',
\'Spanish\'), (\'et\', \'Estonian\'), (\'es-ar\',
\'Argentinean Spanish\'), (\'eu\', \'Basque\'), (\'fa\',
\'Persian\'), (\'fi\', \'Finnish\'), (\'fr\',
\'French\'), (\'ga\', \'Irish\'), (\'gl\',
\'Galician\'), (\'hu\', \'Hungarian\'), (\'he\',
\'Hebrew\'), (\'hi\', \'Hindi\'), (\'hr\',
\'Croatian\'), (\'is\', \'Icelandic\'), (\'it\',
\'Italian\'), (\'ja\', \'Japanese\'), (\'ka\',
\'Georgian\'), (\'ko\', \'Korean\'), (\'km\',
\'Khmer\'), (\'kn\', \'Kannada\'), (\'lv\',
\'Latvian\'), (\'lt\', \'Lithuanian\'), (\'mk\',
\'Macedonian\'), (\'nl\', \'Dutch\'), (\'no\',
\'Norwegian\'), (\'pl\', \'Polish\'), (\'pt\',
\'Portuguese\'), (\'pt-br\', \'Brazilian Portuguese\'),
(\'ro\', \'Romanian\'), (\'ru\', \'Russian\'), (\'sk\',
\'Slovak\'), (\'sl\', \'Slovenian\'), (\'sr\',
\'Serbian\'), (\'sv\', \'Swedish\'), (\'ta\',
\'Tamil\'), (\'te\', \'Telugu\'), (\'th\', \'Thai\'),
(\'tr\', \'Turkish\'), (\'uk\', \'Ukrainian\'),
(\'zh-cn\', \'Simplified Chinese\'), (\'zh-tw\',
\'Traditional Chinese\')), \'LANGUAGE_BIDI\': False,
\'LANGUAGE_CODE\': \'ru\'}, {}, {\'perms\':
<django.core.context_processors.PermWrapper object at
0x1327aa50>, \'messages\': [], \'user\': <User: root>}, {}]'</div>
</div>
</blockquote>
<p>Сделаю небольшое лирическое отступление, <a class="reference external" href="https://tabo.pe/projects/django-treebeard/docs/1.60/index.html">treebeard</a> это
модуль для django, хранить информацию в виде деревьев. Для решения
задачи создания каталога страниц этот модуль очень подходит. Чем он
хорош: умеет работать по технологиям nested sets, materialized path и
adjacence list. Кроме того, у него отличная документация.</p>
<p>Так вот, из-за плохого чтения оной меня покарал Бог. На домашнем и
находящимся на работе компьютером проблем ни каких не возникало.</p>
<p>В документации четко написано, что если используете в этот модуль в
блоке администраторов, то нужно прописать путь
<a class="reference external" href="http://docs.djangoproject.com/en/dev/ref/settings/#template-dirs">TEMPLATE_DIRS</a> до
шаблонов treebeard (в моем случае это
/usr/lib/python2.5/site-packages/treebeard/templates/) а также добавить
<a class="reference external" href="http://docs.djangoproject.com/en/dev/ref/templates/api/#django-core-context-processors-request">django-core-context-processors-request</a> в
<a class="reference external" href="http://docs.djangoproject.com/en/dev/ref/settings/#template-context-processors">TEMPLATE_CONTEXT_PROCESSORS</a></p>
<div class="sharing">
</div>
<hr>
</section>
<div class="clearfix"></div>
</article>
</div>
<!-- Sidebar -->
<div class="four columns">
</div>
</div>
<!-- Container / End -->
</div>
<!-- Content Wrapper / End -->
<div id="footer-bottom">
<!-- Container -->
<div class="container">
<div class="eight columns">Blog powered by <a href="http://getpelican.com">Pelican</a></div>
<div class="eight columns">
<ul class="social-icons-footer">
<li>
<a href="#" class="tooltip top" title="You can add links in your config file">
<i class="icon-you can add links in your config file"></i>
</a>
</li>
<li>
<a href="#" class="tooltip top" title="Another social link">
<i class="icon-another social link"></i>
</a>
</li>
<li><a href="https://dicos.ru/feeds/all.atom.xml" class="tooltip top" title="RSS"><i class="icon-rss"></i></a></li>
</ul>
</div>
</div>
<!-- Container / End -->
</div>
<!-- Footer Bottom / End -->
<!-- Javascripts -->
<script src="https://dicos.ru/theme/js/jquery.min.js"></script>
<!-- Yandex.Metrika counter -->
<script type="text/javascript">
(function (d, w, c) {
(w[c] = w[c] || []).push(function() {
try {
w.yaCounter14462131 = new Ya.Metrika({
id:14462131,
clickmap:true,
trackLinks:true,
accurateTrackBounce:true,
webvisor:true
});
} catch(e) { }
});
var n = d.getElementsByTagName("script")[0],
s = d.createElement("script"),
f = function () { n.parentNode.insertBefore(s, n); };
s.type = "text/javascript";
s.async = true;
s.src = "https://mc.yandex.ru/metrika/watch.js";
if (w.opera == "[object Opera]") {
d.addEventListener("DOMContentLoaded", f, false);
} else { f(); }
})(document, window, "yandex_metrika_callbacks");
</script>
<noscript><div><img src="https://mc.yandex.ru/watch/14462131" style="position:absolute; left:-9999px;" alt="" /></div></noscript>
<!-- /Yandex.Metrika counter --> </body>
</html>