Advertisement
Guest User

Untitled

a guest
Oct 28th, 2015
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 58.20 KB | None | 0 0
  1. UNHANDLED EXCEPTION (2015-10-21 13:01:07.205038)
  2. BRANCH: default TIP: f585036220e0
  3. PROCESS: ./scripts/noc-web.py
  4. ERROR FINGERPRINT: d4d38cb5-7f45-5995-8915-0962226abecb
  5. WORKING DIRECTORY: /opt/noc
  6. EXCEPTION: <type 'exceptions.ImportError'> No module named mwlib.uparser
  7. START OF TRACEBACK
  8. ------------------------------------------------------------------------
  9. File: kb/parsers/mediawiki_parser.py (Line: 34)
  10. Function: to_html
  11. 27
  12. 28 def get_siteinfo(self):
  13. 29 from mwlib import siteinfo
  14. 30 return siteinfo.get_siteinfo("en")
  15. 31
  16. 32 @classmethod
  17. 33 def to_html(cls,kb_entry):
  18. 34 ==> from mwlib.uparser import parseString
  19. 35 from mwlib.xhtmlwriter import MWXHTMLWriter, preprocess
  20. 36 try:
  21. 37 import xml.etree.ElementTree as ET
  22. 38 except:
  23. 39 from elementtree import ElementTree as ET
  24. 40 r=kb_entry.body.replace("\r", "")
  25. Variables:
  26. kb_entry = <KBEntry: KB1: Test>
  27. cls = <class 'noc.kb.parsers.mediawiki_parser.Parser'>
  28. ------------------------------------------------------------------------
  29. File: kb/models.py (Line: 67)
  30. Function: html
  31. 60 return parser_registry[self.markup_language]
  32. 61
  33. 62 @property
  34. 63 def html(self):
  35. 64 """
  36. 65 Returns parsed HTML
  37. 66 """
  38. 67 ==> return self.parser.to_html(self)
  39. 68
  40. 69 @property
  41. 70 def last_history(self):
  42. 71 """
  43. 72 Returns latest KBEntryHistory record
  44. 73 """
  45. Variables:
  46. self = <KBEntry: KB1: Test>
  47. ------------------------------------------------------------------------
  48. File: lib/python2.6/site-packages/django/template/base.py (Line: 754)
  49. Function: _resolve_lookup
  50. 747 current = context
  51. 748 try: # catch-all for silent variable failures
  52. 749 for bit in self.lookups:
  53. 750 try: # dictionary lookup
  54. 751 current = current[bit]
  55. 752 except (TypeError, AttributeError, KeyError):
  56. 753 try: # attribute lookup
  57. 754 ==> current = getattr(current, bit)
  58. 755 except (TypeError, AttributeError):
  59. 756 try: # list-index lookup
  60. 757 current = current[int(bit)]
  61. 758 except (IndexError, # list index out of range
  62. 759 ValueError, # invalid literal for int()
  63. 760 KeyError, # current is a dict without `int(bit)` key
  64. Variables:
  65. current = <KBEntry: KB1: Test>
  66. bit = u'html'
  67. e = ImportError('No module named mwlib.uparser',)
  68. self = <Variable: u'e.html'>
  69. context =
  70. [{'app': <noc.kb.apps.view.views.ViewAppplication object at 0x60394d0>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x6309710>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x63097d0>, 'user': <django.utils.functional.SimpleLazyObject object at 0x6309e50>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x6309e10>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Unconfigured Installation', 'logo_url': '/static/img/logo_black.svg'}}, {'e': <KBEntry: KB1: Test>, 'has_bookmark': False}]
  71. ------------------------------------------------------------------------
  72. File: lib/python2.6/site-packages/django/template/base.py (Line: 721)
  73. Function: resolve
  74. 714 var)
  75. 715 self.lookups = tuple(var.split(VARIABLE_ATTRIBUTE_SEPARATOR))
  76. 716
  77. 717 def resolve(self, context):
  78. 718 """Resolve this variable against a given context."""
  79. 719 if self.lookups is not None:
  80. 720 # We're dealing with a variable that needs to be resolved
  81. 721 ==> value = self._resolve_lookup(context)
  82. 722 else:
  83. 723 # We're dealing with a literal, so it's already been "resolved"
  84. 724 value = self.literal
  85. 725 if self.translate:
  86. 726 if self.message_context:
  87. 727 return pgettext_lazy(self.message_context, value)
  88. Variables:
  89. self = <Variable: u'e.html'>
  90. context =
  91. [{'app': <noc.kb.apps.view.views.ViewAppplication object at 0x60394d0>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x6309710>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x63097d0>, 'user': <django.utils.functional.SimpleLazyObject object at 0x6309e50>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x6309e10>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Unconfigured Installation', 'logo_url': '/static/img/logo_black.svg'}}, {'e': <KBEntry: KB1: Test>, 'has_bookmark': False}]
  92. ------------------------------------------------------------------------
  93. File: lib/python2.6/site-packages/django/template/base.py (Line: 571)
  94. Function: resolve
  95. 564
  96. 565 self.filters = filters
  97. 566 self.var = var_obj
  98. 567
  99. 568 def resolve(self, context, ignore_failures=False):
  100. 569 if isinstance(self.var, Variable):
  101. 570 try:
  102. 571 ==> obj = self.var.resolve(context)
  103. 572 except VariableDoesNotExist:
  104. 573 if ignore_failures:
  105. 574 obj = None
  106. 575 else:
  107. 576 if settings.TEMPLATE_STRING_IF_INVALID:
  108. 577 global invalid_var_format_string
  109. Variables:
  110. self = <django.template.base.FilterExpression object at 0x631aed0>
  111. ignore_failures = False
  112. context =
  113. [{'app': <noc.kb.apps.view.views.ViewAppplication object at 0x60394d0>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x6309710>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x63097d0>, 'user': <django.utils.functional.SimpleLazyObject object at 0x6309e50>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x6309e10>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Unconfigured Installation', 'logo_url': '/static/img/logo_black.svg'}}, {'e': <KBEntry: KB1: Test>, 'has_bookmark': False}]
  114. ------------------------------------------------------------------------
  115. File: lib/python2.6/site-packages/django/template/base.py (Line: 874)
  116. Function: render
  117. 867 self.filter_expression = filter_expression
  118. 868
  119. 869 def __repr__(self):
  120. 870 return "<Variable Node: %s>" % self.filter_expression
  121. 871
  122. 872 def render(self, context):
  123. 873 try:
  124. 874 ==> output = self.filter_expression.resolve(context)
  125. 875 except UnicodeDecodeError:
  126. 876 # Unicode conversion can fail sometimes for reasons out of our
  127. 877 # control (e.g. exception rendering). In that case, we fail
  128. 878 # quietly.
  129. 879 return ''
  130. 880 return _render_value_in_context(output, context)
  131. Variables:
  132. self = <Variable Node: e.html|safe>
  133. context =
  134. [{'app': <noc.kb.apps.view.views.ViewAppplication object at 0x60394d0>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x6309710>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x63097d0>, 'user': <django.utils.functional.SimpleLazyObject object at 0x6309e50>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x6309e10>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Unconfigured Installation', 'logo_url': '/static/img/logo_black.svg'}}, {'e': <KBEntry: KB1: Test>, 'has_bookmark': False}]
  135. ------------------------------------------------------------------------
  136. File: lib/python2.6/site-packages/django/template/base.py (Line: 837)
  137. Function: render_node
  138. 830 "Return a list of all nodes of the given type"
  139. 831 nodes = []
  140. 832 for node in self:
  141. 833 nodes.extend(node.get_nodes_by_type(nodetype))
  142. 834 return nodes
  143. 835
  144. 836 def render_node(self, node, context):
  145. 837 ==> return node.render(context)
  146. 838
  147. 839 class TextNode(Node):
  148. 840 def __init__(self, s):
  149. 841 self.s = s
  150. 842
  151. 843 def __repr__(self):
  152. Variables:
  153. node = <Variable Node: e.html|safe>
  154. self =
  155. [<Text Node: '
  156. <ul class="object-tools"'>,
  157. <IfNode>,
  158. <Text Node: '
  159. <LI><A HREF="'>,
  160. <django.template.defaulttags.URLNode object at 0x646c610>,
  161. <Text Node: '" class="addlink">Add KB '>,
  162. <django.template.defaulttags.URLNode object at 0x61a1150>,
  163. <Text Node: '" class="addlink">Edit</A'>,
  164. <Variable Node: e.id>,
  165. <Text Node: ': '>,
  166. <Variable Node: e.subject>,
  167. <Text Node: '</h1>
  168. '>,
  169. <Variable Node: e.html|safe>,
  170. <Text Node: '
  171.  
  172. '>,
  173. <IfNode>,
  174. <Text Node: '
  175. '>,
  176. <noc.main.templatetags.tags.TagsNode object at 0x627cb10>,
  177. <Text Node: '
  178. <hr/>
  179. Posted at '>,
  180. <Variable Node: e.last_history.timestamp|date>,
  181. <Text Node: ' '>,
  182. <Variable Node: e.last_history.timestamp|time>,
  183. <Text Node: ' by '>,
  184. <Variable Node: e.last_history.user>,
  185. <Text Node: '
  186. '>]
  187. context =
  188. [{'app': <noc.kb.apps.view.views.ViewAppplication object at 0x60394d0>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x6309710>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x63097d0>, 'user': <django.utils.functional.SimpleLazyObject object at 0x6309e50>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x6309e10>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Unconfigured Installation', 'logo_url': '/static/img/logo_black.svg'}}, {'e': <KBEntry: KB1: Test>, 'has_bookmark': False}]
  189. ------------------------------------------------------------------------
  190. File: lib/python2.6/site-packages/django/template/base.py (Line: 823)
  191. Function: render
  192. 816 # extend_nodelist().
  193. 817 contains_nontext = False
  194. 818
  195. 819 def render(self, context):
  196. 820 bits = []
  197. 821 for node in self:
  198. 822 if isinstance(node, Node):
  199. 823 ==> bit = self.render_node(node, context)
  200. 824 else:
  201. 825 bit = node
  202. 826 bits.append(force_unicode(bit))
  203. 827 return mark_safe(u''.join(bits))
  204. 828
  205. 829 def get_nodes_by_type(self, nodetype):
  206. Variables:
  207. node = <Variable Node: e.html|safe>
  208. bit = u'</h1>\n'
  209. bits =
  210. [u'\n<ul class="object-tools">\n ',
  211. u'\n <LI><A HREF="/kb/view/1/bookmark/set/" class="addlink">Set Bookmark</A></LI>\n ',
  212. u'\n <LI><A HREF="',
  213. u'/kb/kbentry/add/',
  214. u'" class="addlink">Add KB Entry</A></LI>\n <LI><A HREF="',
  215. u'/kb/kbentry/1/',
  216. u'" class="addlink">Edit</A></LI>\n</ul>\n<h1>KB',
  217. u'1',
  218. u': ',
  219. u'Test',
  220. u'</h1>\n']
  221. self =
  222. [<Text Node: '
  223. <ul class="object-tools"'>,
  224. <IfNode>,
  225. <Text Node: '
  226. <LI><A HREF="'>,
  227. <django.template.defaulttags.URLNode object at 0x646c610>,
  228. <Text Node: '" class="addlink">Add KB '>,
  229. <django.template.defaulttags.URLNode object at 0x61a1150>,
  230. <Text Node: '" class="addlink">Edit</A'>,
  231. <Variable Node: e.id>,
  232. <Text Node: ': '>,
  233. <Variable Node: e.subject>,
  234. <Text Node: '</h1>
  235. '>,
  236. <Variable Node: e.html|safe>,
  237. <Text Node: '
  238.  
  239. '>,
  240. <IfNode>,
  241. <Text Node: '
  242. '>,
  243. <noc.main.templatetags.tags.TagsNode object at 0x627cb10>,
  244. <Text Node: '
  245. <hr/>
  246. Posted at '>,
  247. <Variable Node: e.last_history.timestamp|date>,
  248. <Text Node: ' '>,
  249. <Variable Node: e.last_history.timestamp|time>,
  250. <Text Node: ' by '>,
  251. <Variable Node: e.last_history.user>,
  252. <Text Node: '
  253. '>]
  254. context =
  255. [{'app': <noc.kb.apps.view.views.ViewAppplication object at 0x60394d0>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x6309710>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x63097d0>, 'user': <django.utils.functional.SimpleLazyObject object at 0x6309e50>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x6309e10>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Unconfigured Installation', 'logo_url': '/static/img/logo_black.svg'}}, {'e': <KBEntry: KB1: Test>, 'has_bookmark': False}]
  256. ------------------------------------------------------------------------
  257. File: lib/python2.6/site-packages/django/template/loader_tags.py (Line: 62)
  258. Function: render
  259. 55 push = block = block_context.pop(self.name)
  260. 56 if block is None:
  261. 57 block = self
  262. 58 # Create new block so we can store context without thread-safety issues.
  263. 59 block = BlockNode(block.name, block.nodelist)
  264. 60 block.context = context
  265. 61 context['block'] = block
  266. 62 ==> result = block.nodelist.render(context)
  267. 63 if push is not None:
  268. 64 block_context.push(self.name, push)
  269. 65 context.pop()
  270. 66 return result
  271. 67
  272. 68 def super(self):
  273. Variables:
  274. push =
  275. <Block Node: content. Contents: [<Text Node: '
  276. <ul class="object-tools"'>, <IfNode>, <Text Node: '
  277. <LI><A HREF="'>, <django.template.defaulttags.URLNode object at 0x646c610>, <Text Node: '" class="addlink">Add KB '>, <django.template.defaulttags.URLNode object at 0x61a1150>, <Text Node: '" class="addlink">Edit</A'>, <Variable Node: e.id>, <Text Node: ': '>, <Variable Node: e.subject>, <Text Node: '</h1>
  278. '>, <Variable Node: e.html|safe>, <Text Node: '
  279.  
  280. '>, <IfNode>, <Text Node: '
  281. '>, <noc.main.templatetags.tags.TagsNode object at 0x627cb10>, <Text Node: '
  282. <hr/>
  283. Posted at '>, <Variable Node: e.last_history.timestamp|date>, <Text Node: ' '>, <Variable Node: e.last_history.timestamp|time>, <Text Node: ' by '>, <Variable Node: e.last_history.user>, <Text Node: '
  284. '>]>
  285. block_context = <django.template.loader_tags.BlockContext object at 0x6309750>
  286. context =
  287. [{'app': <noc.kb.apps.view.views.ViewAppplication object at 0x60394d0>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x6309710>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x63097d0>, 'user': <django.utils.functional.SimpleLazyObject object at 0x6309e50>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x6309e10>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Unconfigured Installation', 'logo_url': '/static/img/logo_black.svg'}}, {'e': <KBEntry: KB1: Test>, 'has_bookmark': False}]
  288. block =
  289. <Block Node: content. Contents: [<Text Node: '
  290. <ul class="object-tools"'>, <IfNode>, <Text Node: '
  291. <LI><A HREF="'>, <django.template.defaulttags.URLNode object at 0x646c610>, <Text Node: '" class="addlink">Add KB '>, <django.template.defaulttags.URLNode object at 0x61a1150>, <Text Node: '" class="addlink">Edit</A'>, <Variable Node: e.id>, <Text Node: ': '>, <Variable Node: e.subject>, <Text Node: '</h1>
  292. '>, <Variable Node: e.html|safe>, <Text Node: '
  293.  
  294. '>, <IfNode>, <Text Node: '
  295. '>, <noc.main.templatetags.tags.TagsNode object at 0x627cb10>, <Text Node: '
  296. <hr/>
  297. Posted at '>, <Variable Node: e.last_history.timestamp|date>, <Text Node: ' '>, <Variable Node: e.last_history.timestamp|time>, <Text Node: ' by '>, <Variable Node: e.last_history.user>, <Text Node: '
  298. '>]>
  299. self =
  300. <Block Node: content. Contents: [<Text Node: '
  301. '>, <Block Node: object-tools. Contents: []>, <Text Node: '
  302. '>, <Variable Node: content>, <Text Node: '
  303. '>]>
  304. ------------------------------------------------------------------------
  305. File: lib/python2.6/site-packages/django/template/base.py (Line: 837)
  306. Function: render_node
  307. 830 "Return a list of all nodes of the given type"
  308. 831 nodes = []
  309. 832 for node in self:
  310. 833 nodes.extend(node.get_nodes_by_type(nodetype))
  311. 834 return nodes
  312. 835
  313. 836 def render_node(self, node, context):
  314. 837 ==> return node.render(context)
  315. 838
  316. 839 class TextNode(Node):
  317. 840 def __init__(self, s):
  318. 841 self.s = s
  319. 842
  320. 843 def __repr__(self):
  321. Variables:
  322. node =
  323. <Block Node: content. Contents: [<Text Node: '
  324. '>, <Block Node: object-tools. Contents: []>, <Text Node: '
  325. '>, <Variable Node: content>, <Text Node: '
  326. '>]>
  327. self =
  328. [<django.template.defaulttags.LoadNode object at 0x61952d0>,
  329. <django.template.defaulttags.LoadNode object at 0x61957d0>,
  330. <Text Node: '<!DOCTYPE html>
  331. <html lan'>,
  332. <Variable Node: LANGUAGE_CODE|default:"en-us">,
  333. <Text Node: '" '>,
  334. <IfNode>,
  335. <Text Node: '>
  336. <head>
  337. <title>'>,
  338. <Block Node: title. Contents: []>,
  339. <Text Node: ' | '>,
  340. <Variable Node: setup.installation_name>,
  341. <Text Node: '</title>
  342. '>,
  343. <IfNode>,
  344. <Text Node: '
  345. <link rel="stylesheet" t'>,
  346. <Block Node: stylesheet. Contents: [<django.template.base.SimpleNode object at 0x637ba50>]>,
  347. <Text Node: '" />
  348. <link rel="styleshee'>,
  349. <django.template.base.SimpleNode object at 0x637b7d0>,
  350. <Text Node: '"></SCRIPT>
  351. '>,
  352. <Block Node: extrastyle. Contents: []>,
  353. <Text Node: '
  354. <!--[if lte IE 7]><link '>,
  355. <Block Node: stylesheet_ie. Contents: [<django.template.defaulttags.LoadNode object at 0x637ba10>, <Text Node: '/media/admin/css/ie.css'>]>,
  356. <Text Node: '" /><![endif]-->
  357. '>,
  358. <IfNode>,
  359. <Text Node: '
  360. <script type="text/javas'>,
  361. <Block Node: extrahead. Contents: []>,
  362. <Text Node: '
  363. '>,
  364. <Block Node: blockbots. Contents: [<Text Node: '<meta name="robots" conte'>]>,
  365. <Text Node: '
  366. </head>
  367. '>,
  368. <django.template.defaulttags.LoadNode object at 0x637bc90>,
  369. <Text Node: '
  370.  
  371. <body class="'>,
  372. <IfNode>,
  373. <Block Node: bodyclass. Contents: []>,
  374. <Text Node: '"
  375. onmousemove="wi'>,
  376. <IfNode>,
  377. <Text Node: '
  378. '>,
  379. <IfNode>,
  380. <Text Node: '
  381.  
  382. <!-- Conten'>,
  383. <Block Node: coltype. Contents: [<Text Node: 'colM'>]>,
  384. <Text Node: '">
  385. '>,
  386. <Block Node: pretitle. Contents: []>,
  387. <Text Node: '
  388. '>,
  389. <Block Node: content_title. Contents: [<IfNode>]>,
  390. <Text Node: '
  391. '>,
  392. <Block Node: content. Contents: [<Text Node: '
  393. '>, <Block Node: object-tools. Contents: []>, <Text Node: '
  394. '>, <Variable Node: content>, <Text Node: '
  395. '>]>,
  396. <Text Node: '
  397. '>,
  398. <Block Node: sidebar. Contents: []>,
  399. <Text Node: '
  400. </div>
  401. <!-- END '>]
  402. context =
  403. [{'app': <noc.kb.apps.view.views.ViewAppplication object at 0x60394d0>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x6309710>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x63097d0>, 'user': <django.utils.functional.SimpleLazyObject object at 0x6309e50>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x6309e10>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Unconfigured Installation', 'logo_url': '/static/img/logo_black.svg'}}, {'e': <KBEntry: KB1: Test>, 'has_bookmark': False}]
  404. ------------------------------------------------------------------------
  405. File: lib/python2.6/site-packages/django/template/base.py (Line: 823)
  406. Function: render
  407. 816 # extend_nodelist().
  408. 817 contains_nontext = False
  409. 818
  410. 819 def render(self, context):
  411. 820 bits = []
  412. 821 for node in self:
  413. 822 if isinstance(node, Node):
  414. 823 ==> bit = self.render_node(node, context)
  415. 824 else:
  416. 825 bit = node
  417. 826 bits.append(force_unicode(bit))
  418. 827 return mark_safe(u''.join(bits))
  419. 828
  420. 829 def get_nodes_by_type(self, nodetype):
  421. Variables:
  422. node =
  423. <Block Node: content. Contents: [<Text Node: '
  424. '>, <Block Node: object-tools. Contents: []>, <Text Node: '
  425. '>, <Variable Node: content>, <Text Node: '
  426. '>]>
  427. bit = u'\n '
  428. bits =
  429. [u'',
  430. u'',
  431. u'<!DOCTYPE html>\n<html lang="',
  432. u'ru',
  433. u'" ',
  434. u'',
  435. u'>\n<head>\n<title>',
  436. u'Knowledge Base: KB1',
  437. u' | ',
  438. u'Unconfigured Installation',
  439. u'</title>\n',
  440. u'\n <link rel="icon" type="image/png" href="/static/img/logo_24x24_deep_azure.png" />\n',
  441. u'\n<link rel="stylesheet" type="text/css" href="',
  442. u'/media/admin/css/base.css',
  443. u'" />\n<link rel="stylesheet" type="text/css" href="/static/css/main.css" />\n<link rel="stylesheet" type="text/css" href="/static/pkg/font-awesome/css/font-awesome.css" />\n<link rel="stylesheet" type="text/css" href="/static/css/noc/colors.css" />\n<META NAME="Copyright" CONTENT="2007-2011, nocproject.org" />\n<META HTTP-EQUIV="Pragma" CONTENT="no-cache" />\n<META HTTP-EQUIV="Cache-Control" CONTENT="no-cache" />\n<META HTTP-EQUIV="Expires" CONTENT="0" />\n<SCRIPT TYPE="text/javascript" SRC="',
  444. u'/media/admin/js/jquery.js',
  445. u'"></SCRIPT>\n',
  446. u'',
  447. u'\n<!--[if lte IE 7]><link rel="stylesheet" type="text/css" href="',
  448. u'/media/admin/css/ie.css',
  449. u'" /><![endif]-->\n',
  450. u'',
  451. u'\n<script type="text/javascript">window.__admin_media_prefix__ = "/media/admin/";</script>\n',
  452. u'\n <link type="text/css" rel="stylesheet" href="/static/css/rack.css" />\n <link rel="stylesheet" type="text/css" href="/static/css/pygments.css" />\n <link rel="stylesheet" type="text/css" href="/static/css/highlight.css" />\n <link rel="stylesheet" type="text/css" href="/static/css/tablesorter.css" />\n <script type="text/javascript" src="/static/js/jquery.tablesorter.js"></SCRIPT>\n \n <link rel="stylesheet" type="text/css" href="/static/apps/kb/view/mediawiki/shared.css" />\n \n <link rel="stylesheet" type="text/css" href="/static/apps/kb/view/mediawiki/main.css" />\n \n',
  453. u'\n',
  454. u'<meta name="robots" content="NONE,NOARCHIVE" />',
  455. u'\n</head>\n',
  456. u'',
  457. u'\n\n<body class="',
  458. u'',
  459. u'',
  460. u'"\n onmousemove="window.top && window.top.NOCIdleHandler && window.top.NOCIdleHandler();"\n onkeydown="window.top && window.top.NOCIdleHandler && window.top.NOCIdleHandler();">\n<!-- Container -->\n<div id="container">\n ',
  461. u'\n <!-- Breadcrumbs -->\n <div class="breadcrumbs"><ul><li>\u041d\u0430\u0447\u0430\u043b\u043e</li><li>Knowledge Base</li>\n\n <li><a href="/kb/view/">View</a></li>\n\n<li>KB1</li></ul></div>\n <!-- END Breadcrumbs -->\n ',
  462. u'\n ',
  463. u'',
  464. u'\n \n <!-- Content -->\n <div id="content" class="',
  465. u'colM',
  466. u'">\n ',
  467. u'',
  468. u'\n ',
  469. u'',
  470. u'\n ']
  471. self =
  472. [<django.template.defaulttags.LoadNode object at 0x61952d0>,
  473. <django.template.defaulttags.LoadNode object at 0x61957d0>,
  474. <Text Node: '<!DOCTYPE html>
  475. <html lan'>,
  476. <Variable Node: LANGUAGE_CODE|default:"en-us">,
  477. <Text Node: '" '>,
  478. <IfNode>,
  479. <Text Node: '>
  480. <head>
  481. <title>'>,
  482. <Block Node: title. Contents: []>,
  483. <Text Node: ' | '>,
  484. <Variable Node: setup.installation_name>,
  485. <Text Node: '</title>
  486. '>,
  487. <IfNode>,
  488. <Text Node: '
  489. <link rel="stylesheet" t'>,
  490. <Block Node: stylesheet. Contents: [<django.template.base.SimpleNode object at 0x637ba50>]>,
  491. <Text Node: '" />
  492. <link rel="styleshee'>,
  493. <django.template.base.SimpleNode object at 0x637b7d0>,
  494. <Text Node: '"></SCRIPT>
  495. '>,
  496. <Block Node: extrastyle. Contents: []>,
  497. <Text Node: '
  498. <!--[if lte IE 7]><link '>,
  499. <Block Node: stylesheet_ie. Contents: [<django.template.defaulttags.LoadNode object at 0x637ba10>, <Text Node: '/media/admin/css/ie.css'>]>,
  500. <Text Node: '" /><![endif]-->
  501. '>,
  502. <IfNode>,
  503. <Text Node: '
  504. <script type="text/javas'>,
  505. <Block Node: extrahead. Contents: []>,
  506. <Text Node: '
  507. '>,
  508. <Block Node: blockbots. Contents: [<Text Node: '<meta name="robots" conte'>]>,
  509. <Text Node: '
  510. </head>
  511. '>,
  512. <django.template.defaulttags.LoadNode object at 0x637bc90>,
  513. <Text Node: '
  514.  
  515. <body class="'>,
  516. <IfNode>,
  517. <Block Node: bodyclass. Contents: []>,
  518. <Text Node: '"
  519. onmousemove="wi'>,
  520. <IfNode>,
  521. <Text Node: '
  522. '>,
  523. <IfNode>,
  524. <Text Node: '
  525.  
  526. <!-- Conten'>,
  527. <Block Node: coltype. Contents: [<Text Node: 'colM'>]>,
  528. <Text Node: '">
  529. '>,
  530. <Block Node: pretitle. Contents: []>,
  531. <Text Node: '
  532. '>,
  533. <Block Node: content_title. Contents: [<IfNode>]>,
  534. <Text Node: '
  535. '>,
  536. <Block Node: content. Contents: [<Text Node: '
  537. '>, <Block Node: object-tools. Contents: []>, <Text Node: '
  538. '>, <Variable Node: content>, <Text Node: '
  539. '>]>,
  540. <Text Node: '
  541. '>,
  542. <Block Node: sidebar. Contents: []>,
  543. <Text Node: '
  544. </div>
  545. <!-- END '>]
  546. context =
  547. [{'app': <noc.kb.apps.view.views.ViewAppplication object at 0x60394d0>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x6309710>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x63097d0>, 'user': <django.utils.functional.SimpleLazyObject object at 0x6309e50>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x6309e10>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Unconfigured Installation', 'logo_url': '/static/img/logo_black.svg'}}, {'e': <KBEntry: KB1: Test>, 'has_bookmark': False}]
  548. ------------------------------------------------------------------------
  549. File: lib/python2.6/site-packages/django/template/base.py (Line: 134)
  550. Function: _render
  551. 127
  552. 128 def __iter__(self):
  553. 129 for node in self.nodelist:
  554. 130 for subnode in node:
  555. 131 yield subnode
  556. 132
  557. 133 def _render(self, context):
  558. 134 ==> return self.nodelist.render(context)
  559. 135
  560. 136 def render(self, context):
  561. 137 "Display stage -- can be called many times"
  562. 138 context.render_context.push()
  563. 139 try:
  564. 140 return self._render(context)
  565. Variables:
  566. self = <django.template.base.Template object at 0x647cc50>
  567. context =
  568. [{'app': <noc.kb.apps.view.views.ViewAppplication object at 0x60394d0>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x6309710>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x63097d0>, 'user': <django.utils.functional.SimpleLazyObject object at 0x6309e50>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x6309e10>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Unconfigured Installation', 'logo_url': '/static/img/logo_black.svg'}}, {'e': <KBEntry: KB1: Test>, 'has_bookmark': False}]
  569. ------------------------------------------------------------------------
  570. File: lib/python2.6/site-packages/django/template/loader_tags.py (Line: 123)
  571. Function: render
  572. 116 blocks = dict([(n.name, n) for n in
  573. 117 compiled_parent.nodelist.get_nodes_by_type(BlockNode)])
  574. 118 block_context.add_blocks(blocks)
  575. 119 break
  576. 120
  577. 121 # Call Template._render explicitly so the parser context stays
  578. 122 # the same.
  579. 123 ==> return compiled_parent._render(context)
  580. 124
  581. 125 class BaseIncludeNode(Node):
  582. 126 def __init__(self, *args, **kwargs):
  583. 127 self.extra_context = kwargs.pop('extra_context', {})
  584. 128 self.isolated_context = kwargs.pop('isolated_context', False)
  585. 129 super(BaseIncludeNode, self).__init__(*args, **kwargs)
  586. Variables:
  587. node = <django.template.defaulttags.LoadNode object at 0x61952d0>
  588. blocks =
  589. {u'blockbots': <Block Node: blockbots. Contents: [<Text Node: '<meta name="robots" conte'>]>,
  590. u'bodyclass': <Block Node: bodyclass. Contents: []>,
  591. u'breadcrumbs': <Block Node: breadcrumbs. Contents: [<Text Node: '<li>'>, <django.templatetags.i18n.TranslateNode object at 0x637b450>, <Text Node: '</li>'>]>,
  592. u'coltype': <Block Node: coltype. Contents: [<Text Node: 'colM'>]>,
  593. u'content': <Block Node: content. Contents: [<Text Node: '
  594. '>, <Block Node: object-tools. Contents: []>, <Text Node: '
  595. '>, <Variable Node: content>, <Text Node: '
  596. '>]>,
  597. u'content_title': <Block Node: content_title. Contents: [<IfNode>]>,
  598. u'extrahead': <Block Node: extrahead. Contents: []>,
  599. u'extrastyle': <Block Node: extrastyle. Contents: []>,
  600. u'object-tools': <Block Node: object-tools. Contents: []>,
  601. u'pretitle': <Block Node: pretitle. Contents: []>,
  602. u'sidebar': <Block Node: sidebar. Contents: []>,
  603. u'stylesheet': <Block Node: stylesheet. Contents: [<django.template.base.SimpleNode object at 0x637ba50>]>,
  604. u'stylesheet_ie': <Block Node: stylesheet_ie. Contents: [<django.template.defaulttags.LoadNode object at 0x637ba10>, <Text Node: '/media/admin/css/ie.css'>]>,
  605. u'stylesheet_rtl': <Block Node: stylesheet_rtl. Contents: [<Text Node: '/media/admin/css/rtl.css'>]>,
  606. u'title': <Block Node: title. Contents: []>}
  607. block_context = <django.template.loader_tags.BlockContext object at 0x6309750>
  608. n = <Block Node: sidebar. Contents: []>
  609. context =
  610. [{'app': <noc.kb.apps.view.views.ViewAppplication object at 0x60394d0>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x6309710>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x63097d0>, 'user': <django.utils.functional.SimpleLazyObject object at 0x6309e50>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x6309e10>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Unconfigured Installation', 'logo_url': '/static/img/logo_black.svg'}}, {'e': <KBEntry: KB1: Test>, 'has_bookmark': False}]
  611. compiled_parent = <django.template.base.Template object at 0x647cc50>
  612. self = <ExtendsNode: extends "admin/base.html">
  613. ------------------------------------------------------------------------
  614. File: lib/python2.6/site-packages/django/template/base.py (Line: 837)
  615. Function: render_node
  616. 830 "Return a list of all nodes of the given type"
  617. 831 nodes = []
  618. 832 for node in self:
  619. 833 nodes.extend(node.get_nodes_by_type(nodetype))
  620. 834 return nodes
  621. 835
  622. 836 def render_node(self, node, context):
  623. 837 ==> return node.render(context)
  624. 838
  625. 839 class TextNode(Node):
  626. 840 def __init__(self, s):
  627. 841 self.s = s
  628. 842
  629. 843 def __repr__(self):
  630. Variables:
  631. node = <ExtendsNode: extends "admin/base.html">
  632. self = [<ExtendsNode: extends "admin/base.html">]
  633. context =
  634. [{'app': <noc.kb.apps.view.views.ViewAppplication object at 0x60394d0>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x6309710>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x63097d0>, 'user': <django.utils.functional.SimpleLazyObject object at 0x6309e50>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x6309e10>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Unconfigured Installation', 'logo_url': '/static/img/logo_black.svg'}}, {'e': <KBEntry: KB1: Test>, 'has_bookmark': False}]
  635. ------------------------------------------------------------------------
  636. File: lib/python2.6/site-packages/django/template/base.py (Line: 823)
  637. Function: render
  638. 816 # extend_nodelist().
  639. 817 contains_nontext = False
  640. 818
  641. 819 def render(self, context):
  642. 820 bits = []
  643. 821 for node in self:
  644. 822 if isinstance(node, Node):
  645. 823 ==> bit = self.render_node(node, context)
  646. 824 else:
  647. 825 bit = node
  648. 826 bits.append(force_unicode(bit))
  649. 827 return mark_safe(u''.join(bits))
  650. 828
  651. 829 def get_nodes_by_type(self, nodetype):
  652. Variables:
  653. node = <ExtendsNode: extends "admin/base.html">
  654. self = [<ExtendsNode: extends "admin/base.html">]
  655. bits = []
  656. context =
  657. [{'app': <noc.kb.apps.view.views.ViewAppplication object at 0x60394d0>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x6309710>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x63097d0>, 'user': <django.utils.functional.SimpleLazyObject object at 0x6309e50>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x6309e10>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Unconfigured Installation', 'logo_url': '/static/img/logo_black.svg'}}, {'e': <KBEntry: KB1: Test>, 'has_bookmark': False}]
  658. ------------------------------------------------------------------------
  659. File: lib/python2.6/site-packages/django/template/base.py (Line: 134)
  660. Function: _render
  661. 127
  662. 128 def __iter__(self):
  663. 129 for node in self.nodelist:
  664. 130 for subnode in node:
  665. 131 yield subnode
  666. 132
  667. 133 def _render(self, context):
  668. 134 ==> return self.nodelist.render(context)
  669. 135
  670. 136 def render(self, context):
  671. 137 "Display stage -- can be called many times"
  672. 138 context.render_context.push()
  673. 139 try:
  674. 140 return self._render(context)
  675. Variables:
  676. self = <django.template.base.Template object at 0x627c410>
  677. context =
  678. [{'app': <noc.kb.apps.view.views.ViewAppplication object at 0x60394d0>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x6309710>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x63097d0>, 'user': <django.utils.functional.SimpleLazyObject object at 0x6309e50>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x6309e10>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Unconfigured Installation', 'logo_url': '/static/img/logo_black.svg'}}, {'e': <KBEntry: KB1: Test>, 'has_bookmark': False}]
  679. ------------------------------------------------------------------------
  680. File: lib/python2.6/site-packages/django/template/loader_tags.py (Line: 123)
  681. Function: render
  682. 116 blocks = dict([(n.name, n) for n in
  683. 117 compiled_parent.nodelist.get_nodes_by_type(BlockNode)])
  684. 118 block_context.add_blocks(blocks)
  685. 119 break
  686. 120
  687. 121 # Call Template._render explicitly so the parser context stays
  688. 122 # the same.
  689. 123 ==> return compiled_parent._render(context)
  690. 124
  691. 125 class BaseIncludeNode(Node):
  692. 126 def __init__(self, *args, **kwargs):
  693. 127 self.extra_context = kwargs.pop('extra_context', {})
  694. 128 self.isolated_context = kwargs.pop('isolated_context', False)
  695. 129 super(BaseIncludeNode, self).__init__(*args, **kwargs)
  696. Variables:
  697. node = <ExtendsNode: extends "admin/base.html">
  698. block_context = <django.template.loader_tags.BlockContext object at 0x6309750>
  699. compiled_parent = <django.template.base.Template object at 0x627c410>
  700. self = <ExtendsNode: extends "template.html">
  701. context =
  702. [{'app': <noc.kb.apps.view.views.ViewAppplication object at 0x60394d0>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x6309710>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x63097d0>, 'user': <django.utils.functional.SimpleLazyObject object at 0x6309e50>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x6309e10>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Unconfigured Installation', 'logo_url': '/static/img/logo_black.svg'}}, {'e': <KBEntry: KB1: Test>, 'has_bookmark': False}]
  703. ------------------------------------------------------------------------
  704. File: lib/python2.6/site-packages/django/template/base.py (Line: 837)
  705. Function: render_node
  706. 830 "Return a list of all nodes of the given type"
  707. 831 nodes = []
  708. 832 for node in self:
  709. 833 nodes.extend(node.get_nodes_by_type(nodetype))
  710. 834 return nodes
  711. 835
  712. 836 def render_node(self, node, context):
  713. 837 ==> return node.render(context)
  714. 838
  715. 839 class TextNode(Node):
  716. 840 def __init__(self, s):
  717. 841 self.s = s
  718. 842
  719. 843 def __repr__(self):
  720. Variables:
  721. node = <ExtendsNode: extends "template.html">
  722. self = [<ExtendsNode: extends "template.html">]
  723. context =
  724. [{'app': <noc.kb.apps.view.views.ViewAppplication object at 0x60394d0>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x6309710>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x63097d0>, 'user': <django.utils.functional.SimpleLazyObject object at 0x6309e50>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x6309e10>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Unconfigured Installation', 'logo_url': '/static/img/logo_black.svg'}}, {'e': <KBEntry: KB1: Test>, 'has_bookmark': False}]
  725. ------------------------------------------------------------------------
  726. File: lib/python2.6/site-packages/django/template/base.py (Line: 823)
  727. Function: render
  728. 816 # extend_nodelist().
  729. 817 contains_nontext = False
  730. 818
  731. 819 def render(self, context):
  732. 820 bits = []
  733. 821 for node in self:
  734. 822 if isinstance(node, Node):
  735. 823 ==> bit = self.render_node(node, context)
  736. 824 else:
  737. 825 bit = node
  738. 826 bits.append(force_unicode(bit))
  739. 827 return mark_safe(u''.join(bits))
  740. 828
  741. 829 def get_nodes_by_type(self, nodetype):
  742. Variables:
  743. node = <ExtendsNode: extends "template.html">
  744. self = [<ExtendsNode: extends "template.html">]
  745. bits = []
  746. context =
  747. [{'app': <noc.kb.apps.view.views.ViewAppplication object at 0x60394d0>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x6309710>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x63097d0>, 'user': <django.utils.functional.SimpleLazyObject object at 0x6309e50>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x6309e10>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Unconfigured Installation', 'logo_url': '/static/img/logo_black.svg'}}, {'e': <KBEntry: KB1: Test>, 'has_bookmark': False}]
  748. ------------------------------------------------------------------------
  749. File: lib/python2.6/site-packages/django/template/base.py (Line: 134)
  750. Function: _render
  751. 127
  752. 128 def __iter__(self):
  753. 129 for node in self.nodelist:
  754. 130 for subnode in node:
  755. 131 yield subnode
  756. 132
  757. 133 def _render(self, context):
  758. 134 ==> return self.nodelist.render(context)
  759. 135
  760. 136 def render(self, context):
  761. 137 "Display stage -- can be called many times"
  762. 138 context.render_context.push()
  763. 139 try:
  764. 140 return self._render(context)
  765. Variables:
  766. self = <django.template.base.Template object at 0x6309610>
  767. context =
  768. [{'app': <noc.kb.apps.view.views.ViewAppplication object at 0x60394d0>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x6309710>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x63097d0>, 'user': <django.utils.functional.SimpleLazyObject object at 0x6309e50>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x6309e10>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Unconfigured Installation', 'logo_url': '/static/img/logo_black.svg'}}, {'e': <KBEntry: KB1: Test>, 'has_bookmark': False}]
  769. ------------------------------------------------------------------------
  770. File: lib/python2.6/site-packages/django/template/base.py (Line: 140)
  771. Function: render
  772. 133 def _render(self, context):
  773. 134 return self.nodelist.render(context)
  774. 135
  775. 136 def render(self, context):
  776. 137 "Display stage -- can be called many times"
  777. 138 context.render_context.push()
  778. 139 try:
  779. 140 ==> return self._render(context)
  780. 141 finally:
  781. 142 context.render_context.pop()
  782. 143
  783. 144 def compile_string(template_string, origin):
  784. 145 "Compiles template_string into NodeList ready for rendering"
  785. 146 if settings.TEMPLATE_DEBUG:
  786. Variables:
  787. self = <django.template.base.Template object at 0x6309610>
  788. context =
  789. [{'app': <noc.kb.apps.view.views.ViewAppplication object at 0x60394d0>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x6309710>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x63097d0>, 'user': <django.utils.functional.SimpleLazyObject object at 0x6309e50>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x6309e10>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Unconfigured Installation', 'logo_url': '/static/img/logo_black.svg'}}, {'e': <KBEntry: KB1: Test>, 'has_bookmark': False}]
  790. ------------------------------------------------------------------------
  791. File: lib/python2.6/site-packages/django/template/loader.py (Line: 176)
  792. Function: render_to_string
  793. 169 t = get_template(template_name)
  794. 170 if not context_instance:
  795. 171 return t.render(Context(dictionary))
  796. 172 # Add the dictionary to the context stack, ensuring it gets removed again
  797. 173 # to keep the context_instance in the same state it started in.
  798. 174 context_instance.update(dictionary)
  799. 175 try:
  800. 176 ==> return t.render(context_instance)
  801. 177 finally:
  802. 178 context_instance.pop()
  803. 179
  804. 180 def select_template(template_name_list):
  805. 181 "Given a list of template names, returns the first that can be loaded."
  806. 182 if not template_name_list:
  807. Variables:
  808. template_name =
  809. ['kb/apps/view/templates/view.html',
  810. 'kb/templates/view.html',
  811. 'templates/view.html']
  812. t = <django.template.base.Template object at 0x6309610>
  813. dictionary = {'e': <KBEntry: KB1: Test>, 'has_bookmark': False}
  814. context_instance =
  815. [{'app': <noc.kb.apps.view.views.ViewAppplication object at 0x60394d0>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x6309710>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x63097d0>, 'user': <django.utils.functional.SimpleLazyObject object at 0x6309e50>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x6309e10>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Unconfigured Installation', 'logo_url': '/static/img/logo_black.svg'}}, {'e': <KBEntry: KB1: Test>, 'has_bookmark': False}]
  816. ------------------------------------------------------------------------
  817. File: lib/python2.6/site-packages/django/shortcuts/__init__.py (Line: 20)
  818. Function: render_to_response
  819. 13
  820. 14 def render_to_response(*args, **kwargs):
  821. 15 """
  822. 16 Returns a HttpResponse whose content is filled with the result of calling
  823. 17 django.template.loader.render_to_string() with the passed arguments.
  824. 18 """
  825. 19 httpresponse_kwargs = {'mimetype': kwargs.pop('mimetype', None)}
  826. 20 ==> return HttpResponse(loader.render_to_string(*args, **kwargs), **httpresponse_kwargs)
  827. 21
  828. 22 def render(request, *args, **kwargs):
  829. 23 """
  830. 24 Returns a HttpResponse whose content is filled with the result of calling
  831. 25 django.template.loader.render_to_string() with the passed arguments.
  832. 26 Uses a RequestContext by default.
  833. Variables:
  834. httpresponse_kwargs = {'mimetype': None}
  835. args =
  836. (['kb/apps/view/templates/view.html',
  837. 'kb/templates/view.html',
  838. 'templates/view.html'],
  839. {'e': <KBEntry: KB1: Test>, 'has_bookmark': False})
  840. kwargs =
  841. {'context_instance': [{'app': <noc.kb.apps.view.views.ViewAppplication object at 0x60394d0>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x6309710>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x63097d0>, 'user': <django.utils.functional.SimpleLazyObject object at 0x6309e50>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x6309e10>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Unconfigured Installation', 'logo_url': '/static/img/logo_black.svg'}}, {'e': <KBEntry: KB1: Test>, 'has_bookmark': False}]}
  842. ------------------------------------------------------------------------
  843. File: lib/app/application.py (Line: 264)
  844. Function: render
  845. 257 def render(self, request, template, dict={}, **kwargs):
  846. 258 """
  847. 259 Render template within context
  848. 260 """
  849. 261 return render_to_response(self.get_template_path(template),
  850. 262 dict if dict else kwargs,
  851. 263 context_instance=RequestContext(request,
  852. 264 ==> {"app": self}))
  853. 265
  854. 266 def render_template(self, template, dict={}, **kwargs):
  855. 267 """
  856. 268 Render template to string
  857. 269 """
  858. 270 tp = self.get_template_path(template)
  859. Variables:
  860. request =
  861. <WSGIRequest
  862. path:/kb/view/1/,
  863. GET:<QueryDict: {}>,
  864. POST:<QueryDict: {}>,
  865. COOKIES:{'csrftoken': 'Eaqz3vysg6MlAKHfCbZitOe3PZnjtNre',
  866. 'sessionid': 'ccef9a12d09c15fe0230b47e5b72690a'},
  867. META:{'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
  868. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate, sdch',
  869. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
  870. 'HTTP_CONNECTION': 'close',
  871. 'HTTP_COOKIE': 'sessionid=ccef9a12d09c15fe0230b47e5b72690a; csrftoken=Eaqz3vysg6MlAKHfCbZitOe3PZnjtNre',
  872. 'HTTP_HOST': '172.22.102.120',
  873. 'HTTP_REFERER': 'http://172.22.102.120/kb/index/latest/',
  874. 'HTTP_UPGRADE_INSECURE_REQUESTS': '1',
  875. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.71 Safari/537.36',
  876. 'HTTP_X_SCHEME': 'http',
  877. 'PATH_INFO': u'/kb/view/1/',
  878. 'QUERY_STRING': '',
  879. 'REMOTE_ADDR': '127.0.0.1',
  880. 'REQUEST_METHOD': 'GET',
  881. 'SCRIPT_NAME': u'',
  882. 'SERVER_NAME': '172.22.102.120',
  883. 'SERVER_PORT': '80',
  884. 'SERVER_PROTOCOL': 'HTTP/1.0',
  885. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x25cb810>,
  886. 'wsgi.input': <io.BytesIO object at 0x62f87d0>,
  887. 'wsgi.multiprocess': True,
  888. 'wsgi.multithread': False,
  889. 'wsgi.run_once': False,
  890. 'wsgi.url_scheme': 'http',
  891. 'wsgi.version': (1, 0)}>
  892. self = <noc.kb.apps.view.views.ViewAppplication object at 0x60394d0>
  893. dict = {'e': <KBEntry: KB1: Test>, 'has_bookmark': False}
  894. template = 'view.html'
  895. kwargs = {}
  896. ------------------------------------------------------------------------
  897. File: kb/apps/view/views.py (Line: 31)
  898. Function: view_view
  899. 24 view_index.access=HasPerm("view")
  900. 25 ##
  901. 26 ## KB Entry Preview
  902. 27 ##
  903. 28 def view_view(self,request,kb_id):
  904. 29 e=get_object_or_404(KBEntry,id=int(kb_id))
  905. 30 e.log_preview(request.user)
  906. 31 ==> return self.render(request,"view.html",{"e":e,"has_bookmark":e.is_bookmarked(request.user)})
  907. 32 view_view.url=r"^(?P<kb_id>\d+)/$"
  908. 33 view_view.url_name="view"
  909. 34 view_view.access=HasPerm("view")
  910. 35 ##
  911. 36 ## Download attachment
  912. 37 ##
  913. Variables:
  914. kb_id = u'1'
  915. request =
  916. <WSGIRequest
  917. path:/kb/view/1/,
  918. GET:<QueryDict: {}>,
  919. POST:<QueryDict: {}>,
  920. COOKIES:{'csrftoken': 'Eaqz3vysg6MlAKHfCbZitOe3PZnjtNre',
  921. 'sessionid': 'ccef9a12d09c15fe0230b47e5b72690a'},
  922. META:{'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
  923. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate, sdch',
  924. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
  925. 'HTTP_CONNECTION': 'close',
  926. 'HTTP_COOKIE': 'sessionid=ccef9a12d09c15fe0230b47e5b72690a; csrftoken=Eaqz3vysg6MlAKHfCbZitOe3PZnjtNre',
  927. 'HTTP_HOST': '172.22.102.120',
  928. 'HTTP_REFERER': 'http://172.22.102.120/kb/index/latest/',
  929. 'HTTP_UPGRADE_INSECURE_REQUESTS': '1',
  930. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.71 Safari/537.36',
  931. 'HTTP_X_SCHEME': 'http',
  932. 'PATH_INFO': u'/kb/view/1/',
  933. 'QUERY_STRING': '',
  934. 'REMOTE_ADDR': '127.0.0.1',
  935. 'REQUEST_METHOD': 'GET',
  936. 'SCRIPT_NAME': u'',
  937. 'SERVER_NAME': '172.22.102.120',
  938. 'SERVER_PORT': '80',
  939. 'SERVER_PROTOCOL': 'HTTP/1.0',
  940. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x25cb810>,
  941. 'wsgi.input': <io.BytesIO object at 0x62f87d0>,
  942. 'wsgi.multiprocess': True,
  943. 'wsgi.multithread': False,
  944. 'wsgi.run_once': False,
  945. 'wsgi.url_scheme': 'http',
  946. 'wsgi.version': (1, 0)}>
  947. self = <noc.kb.apps.view.views.ViewAppplication object at 0x60394d0>
  948. e = <KBEntry: KB1: Test>
  949. ------------------------------------------------------------------------
  950. File: lib/app/site.py (Line: 248)
  951. Function: inner
  952. 241 a = dict((k, v[0] if len(v) == 1 else v)
  953. 242 for k, v in request.GET.lists())
  954. 243 app_logger.debug("API %s %s %s",
  955. 244 request.method, request.path, a)
  956. 245 # Call handler
  957. 246 v.__dict__["hits_metric"] += 1
  958. 247 with v.__dict__["time_metric"].timer():
  959. 248 ==> r = v(request, *args, **kwargs)
  960. 249 # Dump SQL statements
  961. 250 if self.log_sql_statements:
  962. 251 from django.db import connections
  963. 252 tsc = 0
  964. 253 sc = defaultdict(int)
  965. 254 for conn in connections.all():
  966. Variables:
  967. args = ()
  968. view_map =
  969. {'DELETE': <bound method ViewAppplication.view_view of <noc.kb.apps.view.views.ViewAppplication object at 0x60394d0>>,
  970. 'GET': <bound method ViewAppplication.view_view of <noc.kb.apps.view.views.ViewAppplication object at 0x60394d0>>,
  971. 'POST': <bound method ViewAppplication.view_view of <noc.kb.apps.view.views.ViewAppplication object at 0x60394d0>>,
  972. 'PUT': <bound method ViewAppplication.view_view of <noc.kb.apps.view.views.ViewAppplication object at 0x60394d0>>}
  973. Form = <class 'django.forms.forms.Form'>
  974. PermissionDenied = <class 'noc.lib.app.access.PermissionDenied'>
  975. DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
  976. self = <noc.lib.app.site.Site object at 0x2bb34d0>
  977. v =
  978. <bound method ViewAppplication.view_view of <noc.kb.apps.view.views.ViewAppplication object at 0x60394d0>>
  979. request =
  980. <WSGIRequest
  981. path:/kb/view/1/,
  982. GET:<QueryDict: {}>,
  983. POST:<QueryDict: {}>,
  984. COOKIES:{'csrftoken': 'Eaqz3vysg6MlAKHfCbZitOe3PZnjtNre',
  985. 'sessionid': 'ccef9a12d09c15fe0230b47e5b72690a'},
  986. META:{'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
  987. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate, sdch',
  988. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
  989. 'HTTP_CONNECTION': 'close',
  990. 'HTTP_COOKIE': 'sessionid=ccef9a12d09c15fe0230b47e5b72690a; csrftoken=Eaqz3vysg6MlAKHfCbZitOe3PZnjtNre',
  991. 'HTTP_HOST': '172.22.102.120',
  992. 'HTTP_REFERER': 'http://172.22.102.120/kb/index/latest/',
  993. 'HTTP_UPGRADE_INSECURE_REQUESTS': '1',
  994. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.71 Safari/537.36',
  995. 'HTTP_X_SCHEME': 'http',
  996. 'PATH_INFO': u'/kb/view/1/',
  997. 'QUERY_STRING': '',
  998. 'REMOTE_ADDR': '127.0.0.1',
  999. 'REQUEST_METHOD': 'GET',
  1000. 'SCRIPT_NAME': u'',
  1001. 'SERVER_NAME': '172.22.102.120',
  1002. 'SERVER_PORT': '80',
  1003. 'SERVER_PROTOCOL': 'HTTP/1.0',
  1004. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x25cb810>,
  1005. 'wsgi.input': <io.BytesIO object at 0x62f87d0>,
  1006. 'wsgi.multiprocess': True,
  1007. 'wsgi.multithread': False,
  1008. 'wsgi.run_once': False,
  1009. 'wsgi.url_scheme': 'http',
  1010. 'wsgi.version': (1, 0)}>
  1011. app_logger = <logging.Logger instance at 0x5f413b0>
  1012. InterfaceTypeError = <class 'noc.sa.interfaces.base.InterfaceTypeError'>
  1013. to_log_api_call = False
  1014. kwargs = {'kb_id': u'1'}
  1015. nq = <function nq at 0x65aa848>
  1016. app = <noc.kb.apps.view.views.ViewAppplication object at 0x60394d0>
  1017. ------------------------------------------------------------------------
  1018. END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement