Advertisement
Guest User

Untitled

a guest
Nov 21st, 2012
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 71.20 KB | None | 0 0
  1. UNHANDLED EXCEPTION (2012-11-21 14:37:16.832730)
  2. Working directory: /opt/noc
  3. <class 'django.core.urlresolvers.NoReverseMatch'>
  4. Reverse for 'preview' with arguments '(ObjectId('50a0bd977e85c96a24c8b3d2'),)' and keyword arguments '{}' not found.
  5. START OF TRACEBACK
  6. ------------------------------------------------------------------------
  7. File: /opt/noc/contrib/lib/django/template/defaulttags.py (Line: 424)
  8. Function: render
  9. 417 args=args, kwargs=kwargs,
  10. 418 current_app=context.current_app)
  11. 419 except NoReverseMatch:
  12. 420 if self.asvar is None:
  13. 421 # Re-raise the original exception, not the one with
  14. 422 # the path relative to the project. This makes a
  15. 423 # better error message.
  16. 424 ==> raise e
  17. 425 else:
  18. 426 if self.asvar is None:
  19. 427 raise e
  20. 428
  21. 429 if self.asvar:
  22. 430 context[self.asvar] = url
  23. Variables:
  24. project_name = 'noc'
  25. e = NoReverseMatch(u"Reverse for 'preview' with arguments '(ObjectId('50a0bd977e85c96a24c8b3d2'),)' and keyword arguments '{}' not found.",)
  26. reverse = <function reverse at 0x2264aa0>
  27. url = ''
  28. self = <django.template.defaulttags.URLNode object at 0x55f3690>
  29. args = [ObjectId('50a0bd977e85c96a24c8b3d2')]
  30. view_name = u'inv:vendor:preview'
  31. context = [{'app': <noc.inv.apps.model.views.ModelApplication object at 0x4530810>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x55e6e90>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x552d750>, 'user': <django.utils.functional.SimpleLazyObject object at 0x552ded0>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x55df7d0>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Mari El', 'logo_url': '/static/img/logo_24x24_black.png'}}, {'o': <Model: Container | Inventory>, 'extra': {}}, {'block': <Block Node: content. Contents: [<Text Node: '
  32. <h1>'>, <Variable Node: app.verbose_name_plural>, <Text Node: ': '>, <Variable Node: o.name>, <Text Node: '</h1>
  33. <div class="module"'>, <Block Node: preview. Contents: []>, <Text Node: '
  34. </div>
  35. '>]>}]
  36. kwargs = {}
  37. NoReverseMatch = <class 'django.core.urlresolvers.NoReverseMatch'>
  38. arg = <django.template.base.FilterExpression object at 0x55f3290>
  39. ------------------------------------------------------------------------
  40. File: /opt/noc/contrib/lib/django/template/base.py (Line: 837)
  41. Function: render_node
  42. 830 "Return a list of all nodes of the given type"
  43. 831 nodes = []
  44. 832 for node in self:
  45. 833 nodes.extend(node.get_nodes_by_type(nodetype))
  46. 834 return nodes
  47. 835
  48. 836 def render_node(self, node, context):
  49. 837 ==> return node.render(context)
  50. 838
  51. 839 class TextNode(Node):
  52. 840 def __init__(self, s):
  53. 841 self.s = s
  54. 842
  55. 843 def __repr__(self):
  56. Variables:
  57. node = <django.template.defaulttags.URLNode object at 0x55f3690>
  58. self = [<Text Node: '
  59. <style>
  60. .sockets_tab'>, <django.template.defaulttags.URLNode object at 0x55f3690>, <Text Node: '">'>, <Variable Node: o.vendor.name>, <Text Node: '</a></td>
  61. </tr>
  62. <'>, <Variable Node: o.short_name>, <Text Node: '</td></tr>
  63. <tr class='>, <Variable Node: o.is_builtin|bool_icon>, <Text Node: '</td></tr>
  64. <tr class='>, <Variable Node: o.description>, <Text Node: '</td></tr>
  65. <tr class='>, <Variable Node: o.part_number>, <Text Node: '</td></tr>
  66. <tr class='>, <Variable Node: o.part_number_aliases|join:", ">, <Text Node: '</td></tr>
  67. </table>
  68.  
  69. '>, <WithNode>, <Text Node: '
  70.  
  71. '>, <WithNode>, <Text Node: '
  72.  
  73. '>, <WithNode>, <Text Node: '
  74.  
  75. '>]
  76. context = [{'app': <noc.inv.apps.model.views.ModelApplication object at 0x4530810>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x55e6e90>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x552d750>, 'user': <django.utils.functional.SimpleLazyObject object at 0x552ded0>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x55df7d0>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Mari El', 'logo_url': '/static/img/logo_24x24_black.png'}}, {'o': <Model: Container | Inventory>, 'extra': {}}, {'block': <Block Node: content. Contents: [<Text Node: '
  77. <h1>'>, <Variable Node: app.verbose_name_plural>, <Text Node: ': '>, <Variable Node: o.name>, <Text Node: '</h1>
  78. <div class="module"'>, <Block Node: preview. Contents: []>, <Text Node: '
  79. </div>
  80. '>]>}]
  81. ------------------------------------------------------------------------
  82. File: /opt/noc/contrib/lib/django/template/base.py (Line: 823)
  83. Function: render
  84. 816 # extend_nodelist().
  85. 817 contains_nontext = False
  86. 818
  87. 819 def render(self, context):
  88. 820 bits = []
  89. 821 for node in self:
  90. 822 if isinstance(node, Node):
  91. 823 ==> bit = self.render_node(node, context)
  92. 824 else:
  93. 825 bit = node
  94. 826 bits.append(force_unicode(bit))
  95. 827 return mark_safe(u''.join(bits))
  96. 828
  97. 829 def get_nodes_by_type(self, nodetype):
  98. Variables:
  99. node = <django.template.defaulttags.URLNode object at 0x55f3690>
  100. bit = u'\n<style>\n .sockets_table {\n margin-left: 20px;\n }\n .h_name {\n width: 70px;\n }\n .h_type {\n width: 200px;\n }\n .h_kind {\n width: 50px;\n }\n .h_range {\n width: 100px;\n }\n .h_x_range {\n border-left: 7px solid #c0c0c0;\n }\n .help_text {\n font-size: 8pt;\n padding: 4px;\n font-style: italic;\n }\n</style>\n<h2>Description</h2>\n<table border="0">\n <tr class="row1">\n <td><b>Vendor:</b></td>\n <td><a href="'
  101. bits = [u'\n<style>\n .sockets_table {\n margin-left: 20px;\n }\n .h_name {\n width: 70px;\n }\n .h_type {\n width: 200px;\n }\n .h_kind {\n width: 50px;\n }\n .h_range {\n width: 100px;\n }\n .h_x_range {\n border-left: 7px solid #c0c0c0;\n }\n .help_text {\n font-size: 8pt;\n padding: 4px;\n font-style: italic;\n }\n</style>\n<h2>Description</h2>\n<table border="0">\n <tr class="row1">\n <td><b>Vendor:</b></td>\n <td><a href="']
  102. self = [<Text Node: '
  103. <style>
  104. .sockets_tab'>, <django.template.defaulttags.URLNode object at 0x55f3690>, <Text Node: '">'>, <Variable Node: o.vendor.name>, <Text Node: '</a></td>
  105. </tr>
  106. <'>, <Variable Node: o.short_name>, <Text Node: '</td></tr>
  107. <tr class='>, <Variable Node: o.is_builtin|bool_icon>, <Text Node: '</td></tr>
  108. <tr class='>, <Variable Node: o.description>, <Text Node: '</td></tr>
  109. <tr class='>, <Variable Node: o.part_number>, <Text Node: '</td></tr>
  110. <tr class='>, <Variable Node: o.part_number_aliases|join:", ">, <Text Node: '</td></tr>
  111. </table>
  112.  
  113. '>, <WithNode>, <Text Node: '
  114.  
  115. '>, <WithNode>, <Text Node: '
  116.  
  117. '>, <WithNode>, <Text Node: '
  118.  
  119. '>]
  120. context = [{'app': <noc.inv.apps.model.views.ModelApplication object at 0x4530810>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x55e6e90>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x552d750>, 'user': <django.utils.functional.SimpleLazyObject object at 0x552ded0>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x55df7d0>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Mari El', 'logo_url': '/static/img/logo_24x24_black.png'}}, {'o': <Model: Container | Inventory>, 'extra': {}}, {'block': <Block Node: content. Contents: [<Text Node: '
  121. <h1>'>, <Variable Node: app.verbose_name_plural>, <Text Node: ': '>, <Variable Node: o.name>, <Text Node: '</h1>
  122. <div class="module"'>, <Block Node: preview. Contents: []>, <Text Node: '
  123. </div>
  124. '>]>}]
  125. ------------------------------------------------------------------------
  126. File: /opt/noc/contrib/lib/django/template/loader_tags.py (Line: 62)
  127. Function: render
  128. 55 push = block = block_context.pop(self.name)
  129. 56 if block is None:
  130. 57 block = self
  131. 58 # Create new block so we can store context without thread-safety issues.
  132. 59 block = BlockNode(block.name, block.nodelist)
  133. 60 block.context = context
  134. 61 context['block'] = block
  135. 62 ==> result = block.nodelist.render(context)
  136. 63 if push is not None:
  137. 64 block_context.push(self.name, push)
  138. 65 context.pop()
  139. 66 return result
  140. 67
  141. 68 def super(self):
  142. Variables:
  143. push = <Block Node: preview. Contents: [<Text Node: '
  144. <style>
  145. .sockets_tab'>, <django.template.defaulttags.URLNode object at 0x55f3690>, <Text Node: '">'>, <Variable Node: o.vendor.name>, <Text Node: '</a></td>
  146. </tr>
  147. <'>, <Variable Node: o.short_name>, <Text Node: '</td></tr>
  148. <tr class='>, <Variable Node: o.is_builtin|bool_icon>, <Text Node: '</td></tr>
  149. <tr class='>, <Variable Node: o.description>, <Text Node: '</td></tr>
  150. <tr class='>, <Variable Node: o.part_number>, <Text Node: '</td></tr>
  151. <tr class='>, <Variable Node: o.part_number_aliases|join:", ">, <Text Node: '</td></tr>
  152. </table>
  153.  
  154. '>, <WithNode>, <Text Node: '
  155.  
  156. '>, <WithNode>, <Text Node: '
  157.  
  158. '>, <WithNode>, <Text Node: '
  159.  
  160. '>]>
  161. block_context = <django.template.loader_tags.BlockContext object at 0x55f32d0>
  162. context = [{'app': <noc.inv.apps.model.views.ModelApplication object at 0x4530810>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x55e6e90>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x552d750>, 'user': <django.utils.functional.SimpleLazyObject object at 0x552ded0>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x55df7d0>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Mari El', 'logo_url': '/static/img/logo_24x24_black.png'}}, {'o': <Model: Container | Inventory>, 'extra': {}}, {'block': <Block Node: content. Contents: [<Text Node: '
  163. <h1>'>, <Variable Node: app.verbose_name_plural>, <Text Node: ': '>, <Variable Node: o.name>, <Text Node: '</h1>
  164. <div class="module"'>, <Block Node: preview. Contents: []>, <Text Node: '
  165. </div>
  166. '>]>}]
  167. block = <Block Node: preview. Contents: [<Text Node: '
  168. <style>
  169. .sockets_tab'>, <django.template.defaulttags.URLNode object at 0x55f3690>, <Text Node: '">'>, <Variable Node: o.vendor.name>, <Text Node: '</a></td>
  170. </tr>
  171. <'>, <Variable Node: o.short_name>, <Text Node: '</td></tr>
  172. <tr class='>, <Variable Node: o.is_builtin|bool_icon>, <Text Node: '</td></tr>
  173. <tr class='>, <Variable Node: o.description>, <Text Node: '</td></tr>
  174. <tr class='>, <Variable Node: o.part_number>, <Text Node: '</td></tr>
  175. <tr class='>, <Variable Node: o.part_number_aliases|join:", ">, <Text Node: '</td></tr>
  176. </table>
  177.  
  178. '>, <WithNode>, <Text Node: '
  179.  
  180. '>, <WithNode>, <Text Node: '
  181.  
  182. '>, <WithNode>, <Text Node: '
  183.  
  184. '>]>
  185. self = <Block Node: preview. Contents: []>
  186. ------------------------------------------------------------------------
  187. File: /opt/noc/contrib/lib/django/template/base.py (Line: 837)
  188. Function: render_node
  189. 830 "Return a list of all nodes of the given type"
  190. 831 nodes = []
  191. 832 for node in self:
  192. 833 nodes.extend(node.get_nodes_by_type(nodetype))
  193. 834 return nodes
  194. 835
  195. 836 def render_node(self, node, context):
  196. 837 ==> return node.render(context)
  197. 838
  198. 839 class TextNode(Node):
  199. 840 def __init__(self, s):
  200. 841 self.s = s
  201. 842
  202. 843 def __repr__(self):
  203. Variables:
  204. node = <Block Node: preview. Contents: []>
  205. self = [<Text Node: '
  206. <h1>'>, <Variable Node: app.verbose_name_plural>, <Text Node: ': '>, <Variable Node: o.name>, <Text Node: '</h1>
  207. <div class="module"'>, <Block Node: preview. Contents: []>, <Text Node: '
  208. </div>
  209. '>]
  210. context = [{'app': <noc.inv.apps.model.views.ModelApplication object at 0x4530810>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x55e6e90>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x552d750>, 'user': <django.utils.functional.SimpleLazyObject object at 0x552ded0>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x55df7d0>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Mari El', 'logo_url': '/static/img/logo_24x24_black.png'}}, {'o': <Model: Container | Inventory>, 'extra': {}}, {'block': <Block Node: content. Contents: [<Text Node: '
  211. <h1>'>, <Variable Node: app.verbose_name_plural>, <Text Node: ': '>, <Variable Node: o.name>, <Text Node: '</h1>
  212. <div class="module"'>, <Block Node: preview. Contents: []>, <Text Node: '
  213. </div>
  214. '>]>}]
  215. ------------------------------------------------------------------------
  216. File: /opt/noc/contrib/lib/django/template/base.py (Line: 823)
  217. Function: render
  218. 816 # extend_nodelist().
  219. 817 contains_nontext = False
  220. 818
  221. 819 def render(self, context):
  222. 820 bits = []
  223. 821 for node in self:
  224. 822 if isinstance(node, Node):
  225. 823 ==> bit = self.render_node(node, context)
  226. 824 else:
  227. 825 bit = node
  228. 826 bits.append(force_unicode(bit))
  229. 827 return mark_safe(u''.join(bits))
  230. 828
  231. 829 def get_nodes_by_type(self, nodetype):
  232. Variables:
  233. node = <Block Node: preview. Contents: []>
  234. bit = u'</h1>\n<div class="module">\n'
  235. bits = [u'\n<h1>', u'Models', u': ', u'Container | Inventory', u'</h1>\n<div class="module">\n']
  236. self = [<Text Node: '
  237. <h1>'>, <Variable Node: app.verbose_name_plural>, <Text Node: ': '>, <Variable Node: o.name>, <Text Node: '</h1>
  238. <div class="module"'>, <Block Node: preview. Contents: []>, <Text Node: '
  239. </div>
  240. '>]
  241. context = [{'app': <noc.inv.apps.model.views.ModelApplication object at 0x4530810>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x55e6e90>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x552d750>, 'user': <django.utils.functional.SimpleLazyObject object at 0x552ded0>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x55df7d0>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Mari El', 'logo_url': '/static/img/logo_24x24_black.png'}}, {'o': <Model: Container | Inventory>, 'extra': {}}, {'block': <Block Node: content. Contents: [<Text Node: '
  242. <h1>'>, <Variable Node: app.verbose_name_plural>, <Text Node: ': '>, <Variable Node: o.name>, <Text Node: '</h1>
  243. <div class="module"'>, <Block Node: preview. Contents: []>, <Text Node: '
  244. </div>
  245. '>]>}]
  246. ------------------------------------------------------------------------
  247. File: /opt/noc/contrib/lib/django/template/loader_tags.py (Line: 62)
  248. Function: render
  249. 55 push = block = block_context.pop(self.name)
  250. 56 if block is None:
  251. 57 block = self
  252. 58 # Create new block so we can store context without thread-safety issues.
  253. 59 block = BlockNode(block.name, block.nodelist)
  254. 60 block.context = context
  255. 61 context['block'] = block
  256. 62 ==> result = block.nodelist.render(context)
  257. 63 if push is not None:
  258. 64 block_context.push(self.name, push)
  259. 65 context.pop()
  260. 66 return result
  261. 67
  262. 68 def super(self):
  263. Variables:
  264. push = <Block Node: content. Contents: [<Text Node: '
  265. <h1>'>, <Variable Node: app.verbose_name_plural>, <Text Node: ': '>, <Variable Node: o.name>, <Text Node: '</h1>
  266. <div class="module"'>, <Block Node: preview. Contents: []>, <Text Node: '
  267. </div>
  268. '>]>
  269. block_context = <django.template.loader_tags.BlockContext object at 0x55f32d0>
  270. context = [{'app': <noc.inv.apps.model.views.ModelApplication object at 0x4530810>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x55e6e90>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x552d750>, 'user': <django.utils.functional.SimpleLazyObject object at 0x552ded0>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x55df7d0>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Mari El', 'logo_url': '/static/img/logo_24x24_black.png'}}, {'o': <Model: Container | Inventory>, 'extra': {}}, {'block': <Block Node: content. Contents: [<Text Node: '
  271. <h1>'>, <Variable Node: app.verbose_name_plural>, <Text Node: ': '>, <Variable Node: o.name>, <Text Node: '</h1>
  272. <div class="module"'>, <Block Node: preview. Contents: []>, <Text Node: '
  273. </div>
  274. '>]>}]
  275. block = <Block Node: content. Contents: [<Text Node: '
  276. <h1>'>, <Variable Node: app.verbose_name_plural>, <Text Node: ': '>, <Variable Node: o.name>, <Text Node: '</h1>
  277. <div class="module"'>, <Block Node: preview. Contents: []>, <Text Node: '
  278. </div>
  279. '>]>
  280. self = <Block Node: content. Contents: [<Text Node: '
  281. '>, <Block Node: object-tools. Contents: []>, <Text Node: '
  282. '>, <Variable Node: content>, <Text Node: '
  283. '>]>
  284. ------------------------------------------------------------------------
  285. File: /opt/noc/contrib/lib/django/template/base.py (Line: 837)
  286. Function: render_node
  287. 830 "Return a list of all nodes of the given type"
  288. 831 nodes = []
  289. 832 for node in self:
  290. 833 nodes.extend(node.get_nodes_by_type(nodetype))
  291. 834 return nodes
  292. 835
  293. 836 def render_node(self, node, context):
  294. 837 ==> return node.render(context)
  295. 838
  296. 839 class TextNode(Node):
  297. 840 def __init__(self, s):
  298. 841 self.s = s
  299. 842
  300. 843 def __repr__(self):
  301. Variables:
  302. node = <Block Node: content. Contents: [<Text Node: '
  303. '>, <Block Node: object-tools. Contents: []>, <Text Node: '
  304. '>, <Variable Node: content>, <Text Node: '
  305. '>]>
  306. self = [<django.template.defaulttags.LoadNode object at 0x52f9e50>, <django.template.defaulttags.LoadNode object at 0x539acd0>, <Text Node: '<!DOCTYPE html>
  307. <html lan'>, <Variable Node: LANGUAGE_CODE|default:"en-us">, <Text Node: '" '>, <IfNode>, <Text Node: '>
  308. <head>
  309. <title>'>, <Block Node: title. Contents: []>, <Text Node: ' | '>, <Variable Node: setup.installation_name>, <Text Node: '</title>
  310. '>, <IfNode>, <Text Node: '
  311. <link rel="stylesheet" t'>, <Block Node: stylesheet. Contents: [<django.template.base.SimpleNode object at 0x5163050>]>, <Text Node: '" /><link rel="stylesheet'>, <django.template.base.SimpleNode object at 0x52e3150>, <Text Node: '"></SCRIPT>
  312. <SCRIPT TYPE='>, <Block Node: extrastyle. Contents: []>, <Text Node: '
  313. <!--[if lte IE 7]><link '>, <Block Node: stylesheet_ie. Contents: [<django.template.defaulttags.LoadNode object at 0x52e3b10>, <Text Node: '/media/admin/css/ie.css'>]>, <Text Node: '" /><![endif]-->
  314. '>, <IfNode>, <Text Node: '
  315. <script type="text/javas'>, <Block Node: extrahead. Contents: []>, <Text Node: '
  316. '>, <Block Node: blockbots. Contents: [<Text Node: '<meta name="robots" conte'>]>, <Text Node: '
  317. </head>
  318. '>, <django.template.defaulttags.LoadNode object at 0x545b7d0>, <Text Node: '
  319.  
  320. <body class="'>, <IfNode>, <Block Node: bodyclass. Contents: []>, <Text Node: '"
  321. onmousemove="wi'>, <IfNode>, <Text Node: '
  322. '>, <IfNode>, <Text Node: '
  323.  
  324. <!-- Conten'>, <Block Node: coltype. Contents: [<Text Node: 'colM'>]>, <Text Node: '">
  325. '>, <Block Node: pretitle. Contents: []>, <Text Node: '
  326. '>, <Block Node: content_title. Contents: [<IfNode>]>, <Text Node: '
  327. '>, <Block Node: content. Contents: [<Text Node: '
  328. '>, <Block Node: object-tools. Contents: []>, <Text Node: '
  329. '>, <Variable Node: content>, <Text Node: '
  330. '>]>, <Text Node: '
  331. '>, <Block Node: sidebar. Contents: []>, <Text Node: '
  332. </div>
  333. <!-- END '>]
  334. context = [{'app': <noc.inv.apps.model.views.ModelApplication object at 0x4530810>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x55e6e90>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x552d750>, 'user': <django.utils.functional.SimpleLazyObject object at 0x552ded0>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x55df7d0>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Mari El', 'logo_url': '/static/img/logo_24x24_black.png'}}, {'o': <Model: Container | Inventory>, 'extra': {}}, {'block': <Block Node: content. Contents: [<Text Node: '
  335. <h1>'>, <Variable Node: app.verbose_name_plural>, <Text Node: ': '>, <Variable Node: o.name>, <Text Node: '</h1>
  336. <div class="module"'>, <Block Node: preview. Contents: []>, <Text Node: '
  337. </div>
  338. '>]>}]
  339. ------------------------------------------------------------------------
  340. File: /opt/noc/contrib/lib/django/template/base.py (Line: 823)
  341. Function: render
  342. 816 # extend_nodelist().
  343. 817 contains_nontext = False
  344. 818
  345. 819 def render(self, context):
  346. 820 bits = []
  347. 821 for node in self:
  348. 822 if isinstance(node, Node):
  349. 823 ==> bit = self.render_node(node, context)
  350. 824 else:
  351. 825 bit = node
  352. 826 bits.append(force_unicode(bit))
  353. 827 return mark_safe(u''.join(bits))
  354. 828
  355. 829 def get_nodes_by_type(self, nodetype):
  356. Variables:
  357. node = <Block Node: content. Contents: [<Text Node: '
  358. '>, <Block Node: object-tools. Contents: []>, <Text Node: '
  359. '>, <Variable Node: content>, <Text Node: '
  360. '>]>
  361. bit = u'\n '
  362. bits = [u'', u'', u'<!DOCTYPE html>\n<html lang="', u'ru', u'" ', u'', u'>\n<head>\n<title>', u'Models', u' | ', u'Mari El', u'</title>\n', u'\n <link rel="icon" type="image/png" href="/static/img/logo_24x24_deep_azure.png" />\n', u'\n<link rel="stylesheet" type="text/css" href="', u'/media/admin/css/base.css', u'" /><link rel="stylesheet" type="text/css" href="/static/css/main.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="', u'/media/admin/js/jquery.js', u'"></SCRIPT>\n<SCRIPT TYPE="text/javascript" SRC="/static/js/jquery.corner.js"></SCRIPT>\n<SCRIPT TYPE="text/javascript" SRC="/static/js/popup.js"></SCRIPT>\n', u'', u'\n<!--[if lte IE 7]><link rel="stylesheet" type="text/css" href="', u'/media/admin/css/ie.css', u'" /><![endif]-->\n', u'', u'\n<script type="text/javascript">window.__admin_media_prefix__ = "/media/admin/";</script>\n', u'\n\n', u'\n', u'<meta name="robots" content="NONE,NOARCHIVE" />', u'\n</head>\n', u'', u'\n\n<body class="', u'', u'', 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 ', u'\n <!-- Breadcrumbs -->\n <div class="breadcrumbs"><ul><li>\u041d\u0430\u0447\u0430\u043b\u043e</li><li>Inventory</li>\n\n <li><a href="/inv/model/">Models</a></li>\n\n<li>Container | Inventory</li></ul></div>\n <!-- END Breadcrumbs -->\n ', u'\n ', u'', u'\n \n <!-- Content -->\n <div id="content" class="', u'colM', u'">\n ', u'', u'\n ', u'', u'\n ']
  363. self = [<django.template.defaulttags.LoadNode object at 0x52f9e50>, <django.template.defaulttags.LoadNode object at 0x539acd0>, <Text Node: '<!DOCTYPE html>
  364. <html lan'>, <Variable Node: LANGUAGE_CODE|default:"en-us">, <Text Node: '" '>, <IfNode>, <Text Node: '>
  365. <head>
  366. <title>'>, <Block Node: title. Contents: []>, <Text Node: ' | '>, <Variable Node: setup.installation_name>, <Text Node: '</title>
  367. '>, <IfNode>, <Text Node: '
  368. <link rel="stylesheet" t'>, <Block Node: stylesheet. Contents: [<django.template.base.SimpleNode object at 0x5163050>]>, <Text Node: '" /><link rel="stylesheet'>, <django.template.base.SimpleNode object at 0x52e3150>, <Text Node: '"></SCRIPT>
  369. <SCRIPT TYPE='>, <Block Node: extrastyle. Contents: []>, <Text Node: '
  370. <!--[if lte IE 7]><link '>, <Block Node: stylesheet_ie. Contents: [<django.template.defaulttags.LoadNode object at 0x52e3b10>, <Text Node: '/media/admin/css/ie.css'>]>, <Text Node: '" /><![endif]-->
  371. '>, <IfNode>, <Text Node: '
  372. <script type="text/javas'>, <Block Node: extrahead. Contents: []>, <Text Node: '
  373. '>, <Block Node: blockbots. Contents: [<Text Node: '<meta name="robots" conte'>]>, <Text Node: '
  374. </head>
  375. '>, <django.template.defaulttags.LoadNode object at 0x545b7d0>, <Text Node: '
  376.  
  377. <body class="'>, <IfNode>, <Block Node: bodyclass. Contents: []>, <Text Node: '"
  378. onmousemove="wi'>, <IfNode>, <Text Node: '
  379. '>, <IfNode>, <Text Node: '
  380.  
  381. <!-- Conten'>, <Block Node: coltype. Contents: [<Text Node: 'colM'>]>, <Text Node: '">
  382. '>, <Block Node: pretitle. Contents: []>, <Text Node: '
  383. '>, <Block Node: content_title. Contents: [<IfNode>]>, <Text Node: '
  384. '>, <Block Node: content. Contents: [<Text Node: '
  385. '>, <Block Node: object-tools. Contents: []>, <Text Node: '
  386. '>, <Variable Node: content>, <Text Node: '
  387. '>]>, <Text Node: '
  388. '>, <Block Node: sidebar. Contents: []>, <Text Node: '
  389. </div>
  390. <!-- END '>]
  391. context = [{'app': <noc.inv.apps.model.views.ModelApplication object at 0x4530810>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x55e6e90>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x552d750>, 'user': <django.utils.functional.SimpleLazyObject object at 0x552ded0>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x55df7d0>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Mari El', 'logo_url': '/static/img/logo_24x24_black.png'}}, {'o': <Model: Container | Inventory>, 'extra': {}}, {'block': <Block Node: content. Contents: [<Text Node: '
  392. <h1>'>, <Variable Node: app.verbose_name_plural>, <Text Node: ': '>, <Variable Node: o.name>, <Text Node: '</h1>
  393. <div class="module"'>, <Block Node: preview. Contents: []>, <Text Node: '
  394. </div>
  395. '>]>}]
  396. ------------------------------------------------------------------------
  397. File: /opt/noc/contrib/lib/django/template/base.py (Line: 134)
  398. Function: _render
  399. 127
  400. 128 def __iter__(self):
  401. 129 for node in self.nodelist:
  402. 130 for subnode in node:
  403. 131 yield subnode
  404. 132
  405. 133 def _render(self, context):
  406. 134 ==> return self.nodelist.render(context)
  407. 135
  408. 136 def render(self, context):
  409. 137 "Display stage -- can be called many times"
  410. 138 context.render_context.push()
  411. 139 try:
  412. 140 return self._render(context)
  413. Variables:
  414. self = <django.template.base.Template object at 0x544d550>
  415. context = [{'app': <noc.inv.apps.model.views.ModelApplication object at 0x4530810>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x55e6e90>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x552d750>, 'user': <django.utils.functional.SimpleLazyObject object at 0x552ded0>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x55df7d0>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Mari El', 'logo_url': '/static/img/logo_24x24_black.png'}}, {'o': <Model: Container | Inventory>, 'extra': {}}, {'block': <Block Node: content. Contents: [<Text Node: '
  416. <h1>'>, <Variable Node: app.verbose_name_plural>, <Text Node: ': '>, <Variable Node: o.name>, <Text Node: '</h1>
  417. <div class="module"'>, <Block Node: preview. Contents: []>, <Text Node: '
  418. </div>
  419. '>]>}]
  420. ------------------------------------------------------------------------
  421. File: /opt/noc/contrib/lib/django/template/loader_tags.py (Line: 123)
  422. Function: render
  423. 116 blocks = dict([(n.name, n) for n in
  424. 117 compiled_parent.nodelist.get_nodes_by_type(BlockNode)])
  425. 118 block_context.add_blocks(blocks)
  426. 119 break
  427. 120
  428. 121 # Call Template._render explicitly so the parser context stays
  429. 122 # the same.
  430. 123 ==> return compiled_parent._render(context)
  431. 124
  432. 125 class BaseIncludeNode(Node):
  433. 126 def __init__(self, *args, **kwargs):
  434. 127 self.extra_context = kwargs.pop('extra_context', {})
  435. 128 self.isolated_context = kwargs.pop('isolated_context', False)
  436. 129 super(BaseIncludeNode, self).__init__(*args, **kwargs)
  437. Variables:
  438. node = <django.template.defaulttags.LoadNode object at 0x52f9e50>
  439. blocks = {u'content_title': <Block Node: content_title. Contents: [<IfNode>]>, u'extrastyle': <Block Node: extrastyle. Contents: []>, u'bodyclass': <Block Node: bodyclass. Contents: []>, u'title': <Block Node: title. Contents: []>, u'extrahead': <Block Node: extrahead. Contents: []>, u'object-tools': <Block Node: object-tools. Contents: []>, u'stylesheet_ie': <Block Node: stylesheet_ie. Contents: [<django.template.defaulttags.LoadNode object at 0x52e3b10>, <Text Node: '/media/admin/css/ie.css'>]>, u'content': <Block Node: content. Contents: [<Text Node: '
  440. '>, <Block Node: object-tools. Contents: []>, <Text Node: '
  441. '>, <Variable Node: content>, <Text Node: '
  442. '>]>, u'stylesheet_rtl': <Block Node: stylesheet_rtl. Contents: [<Text Node: '/media/admin/css/rtl.css'>]>, u'stylesheet': <Block Node: stylesheet. Contents: [<django.template.base.SimpleNode object at 0x5163050>]>, u'breadcrumbs': <Block Node: breadcrumbs. Contents: [<Text Node: '<li>'>, <django.templatetags.i18n.TranslateNode object at 0x544a710>, <Text Node: '</li>'>]>, u'blockbots': <Block Node: blockbots. Contents: [<Text Node: '<meta name="robots" conte'>]>, u'coltype': <Block Node: coltype. Contents: [<Text Node: 'colM'>]>, u'sidebar': <Block Node: sidebar. Contents: []>, u'pretitle': <Block Node: pretitle. Contents: []>}
  443. block_context = <django.template.loader_tags.BlockContext object at 0x55f32d0>
  444. n = <Block Node: sidebar. Contents: []>
  445. context = [{'app': <noc.inv.apps.model.views.ModelApplication object at 0x4530810>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x55e6e90>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x552d750>, 'user': <django.utils.functional.SimpleLazyObject object at 0x552ded0>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x55df7d0>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Mari El', 'logo_url': '/static/img/logo_24x24_black.png'}}, {'o': <Model: Container | Inventory>, 'extra': {}}, {'block': <Block Node: content. Contents: [<Text Node: '
  446. <h1>'>, <Variable Node: app.verbose_name_plural>, <Text Node: ': '>, <Variable Node: o.name>, <Text Node: '</h1>
  447. <div class="module"'>, <Block Node: preview. Contents: []>, <Text Node: '
  448. </div>
  449. '>]>}]
  450. compiled_parent = <django.template.base.Template object at 0x544d550>
  451. self = <ExtendsNode: extends "admin/base.html">
  452. ------------------------------------------------------------------------
  453. File: /opt/noc/contrib/lib/django/template/base.py (Line: 837)
  454. Function: render_node
  455. 830 "Return a list of all nodes of the given type"
  456. 831 nodes = []
  457. 832 for node in self:
  458. 833 nodes.extend(node.get_nodes_by_type(nodetype))
  459. 834 return nodes
  460. 835
  461. 836 def render_node(self, node, context):
  462. 837 ==> return node.render(context)
  463. 838
  464. 839 class TextNode(Node):
  465. 840 def __init__(self, s):
  466. 841 self.s = s
  467. 842
  468. 843 def __repr__(self):
  469. Variables:
  470. node = <ExtendsNode: extends "admin/base.html">
  471. self = [<ExtendsNode: extends "admin/base.html">]
  472. context = [{'app': <noc.inv.apps.model.views.ModelApplication object at 0x4530810>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x55e6e90>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x552d750>, 'user': <django.utils.functional.SimpleLazyObject object at 0x552ded0>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x55df7d0>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Mari El', 'logo_url': '/static/img/logo_24x24_black.png'}}, {'o': <Model: Container | Inventory>, 'extra': {}}, {'block': <Block Node: content. Contents: [<Text Node: '
  473. <h1>'>, <Variable Node: app.verbose_name_plural>, <Text Node: ': '>, <Variable Node: o.name>, <Text Node: '</h1>
  474. <div class="module"'>, <Block Node: preview. Contents: []>, <Text Node: '
  475. </div>
  476. '>]>}]
  477. ------------------------------------------------------------------------
  478. File: /opt/noc/contrib/lib/django/template/base.py (Line: 823)
  479. Function: render
  480. 816 # extend_nodelist().
  481. 817 contains_nontext = False
  482. 818
  483. 819 def render(self, context):
  484. 820 bits = []
  485. 821 for node in self:
  486. 822 if isinstance(node, Node):
  487. 823 ==> bit = self.render_node(node, context)
  488. 824 else:
  489. 825 bit = node
  490. 826 bits.append(force_unicode(bit))
  491. 827 return mark_safe(u''.join(bits))
  492. 828
  493. 829 def get_nodes_by_type(self, nodetype):
  494. Variables:
  495. node = <ExtendsNode: extends "admin/base.html">
  496. self = [<ExtendsNode: extends "admin/base.html">]
  497. bits = []
  498. context = [{'app': <noc.inv.apps.model.views.ModelApplication object at 0x4530810>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x55e6e90>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x552d750>, 'user': <django.utils.functional.SimpleLazyObject object at 0x552ded0>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x55df7d0>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Mari El', 'logo_url': '/static/img/logo_24x24_black.png'}}, {'o': <Model: Container | Inventory>, 'extra': {}}, {'block': <Block Node: content. Contents: [<Text Node: '
  499. <h1>'>, <Variable Node: app.verbose_name_plural>, <Text Node: ': '>, <Variable Node: o.name>, <Text Node: '</h1>
  500. <div class="module"'>, <Block Node: preview. Contents: []>, <Text Node: '
  501. </div>
  502. '>]>}]
  503. ------------------------------------------------------------------------
  504. File: /opt/noc/contrib/lib/django/template/base.py (Line: 134)
  505. Function: _render
  506. 127
  507. 128 def __iter__(self):
  508. 129 for node in self.nodelist:
  509. 130 for subnode in node:
  510. 131 yield subnode
  511. 132
  512. 133 def _render(self, context):
  513. 134 ==> return self.nodelist.render(context)
  514. 135
  515. 136 def render(self, context):
  516. 137 "Display stage -- can be called many times"
  517. 138 context.render_context.push()
  518. 139 try:
  519. 140 return self._render(context)
  520. Variables:
  521. self = <django.template.base.Template object at 0x54765d0>
  522. context = [{'app': <noc.inv.apps.model.views.ModelApplication object at 0x4530810>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x55e6e90>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x552d750>, 'user': <django.utils.functional.SimpleLazyObject object at 0x552ded0>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x55df7d0>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Mari El', 'logo_url': '/static/img/logo_24x24_black.png'}}, {'o': <Model: Container | Inventory>, 'extra': {}}, {'block': <Block Node: content. Contents: [<Text Node: '
  523. <h1>'>, <Variable Node: app.verbose_name_plural>, <Text Node: ': '>, <Variable Node: o.name>, <Text Node: '</h1>
  524. <div class="module"'>, <Block Node: preview. Contents: []>, <Text Node: '
  525. </div>
  526. '>]>}]
  527. ------------------------------------------------------------------------
  528. File: /opt/noc/contrib/lib/django/template/loader_tags.py (Line: 123)
  529. Function: render
  530. 116 blocks = dict([(n.name, n) for n in
  531. 117 compiled_parent.nodelist.get_nodes_by_type(BlockNode)])
  532. 118 block_context.add_blocks(blocks)
  533. 119 break
  534. 120
  535. 121 # Call Template._render explicitly so the parser context stays
  536. 122 # the same.
  537. 123 ==> return compiled_parent._render(context)
  538. 124
  539. 125 class BaseIncludeNode(Node):
  540. 126 def __init__(self, *args, **kwargs):
  541. 127 self.extra_context = kwargs.pop('extra_context', {})
  542. 128 self.isolated_context = kwargs.pop('isolated_context', False)
  543. 129 super(BaseIncludeNode, self).__init__(*args, **kwargs)
  544. Variables:
  545. node = <ExtendsNode: extends "admin/base.html">
  546. block_context = <django.template.loader_tags.BlockContext object at 0x55f32d0>
  547. compiled_parent = <django.template.base.Template object at 0x54765d0>
  548. self = <ExtendsNode: extends "template.html">
  549. context = [{'app': <noc.inv.apps.model.views.ModelApplication object at 0x4530810>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x55e6e90>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x552d750>, 'user': <django.utils.functional.SimpleLazyObject object at 0x552ded0>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x55df7d0>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Mari El', 'logo_url': '/static/img/logo_24x24_black.png'}}, {'o': <Model: Container | Inventory>, 'extra': {}}, {'block': <Block Node: content. Contents: [<Text Node: '
  550. <h1>'>, <Variable Node: app.verbose_name_plural>, <Text Node: ': '>, <Variable Node: o.name>, <Text Node: '</h1>
  551. <div class="module"'>, <Block Node: preview. Contents: []>, <Text Node: '
  552. </div>
  553. '>]>}]
  554. ------------------------------------------------------------------------
  555. File: /opt/noc/contrib/lib/django/template/base.py (Line: 837)
  556. Function: render_node
  557. 830 "Return a list of all nodes of the given type"
  558. 831 nodes = []
  559. 832 for node in self:
  560. 833 nodes.extend(node.get_nodes_by_type(nodetype))
  561. 834 return nodes
  562. 835
  563. 836 def render_node(self, node, context):
  564. 837 ==> return node.render(context)
  565. 838
  566. 839 class TextNode(Node):
  567. 840 def __init__(self, s):
  568. 841 self.s = s
  569. 842
  570. 843 def __repr__(self):
  571. Variables:
  572. node = <ExtendsNode: extends "template.html">
  573. self = [<ExtendsNode: extends "template.html">]
  574. context = [{'app': <noc.inv.apps.model.views.ModelApplication object at 0x4530810>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x55e6e90>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x552d750>, 'user': <django.utils.functional.SimpleLazyObject object at 0x552ded0>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x55df7d0>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Mari El', 'logo_url': '/static/img/logo_24x24_black.png'}}, {'o': <Model: Container | Inventory>, 'extra': {}}, {'block': <Block Node: content. Contents: [<Text Node: '
  575. <h1>'>, <Variable Node: app.verbose_name_plural>, <Text Node: ': '>, <Variable Node: o.name>, <Text Node: '</h1>
  576. <div class="module"'>, <Block Node: preview. Contents: []>, <Text Node: '
  577. </div>
  578. '>]>}]
  579. ------------------------------------------------------------------------
  580. File: /opt/noc/contrib/lib/django/template/base.py (Line: 823)
  581. Function: render
  582. 816 # extend_nodelist().
  583. 817 contains_nontext = False
  584. 818
  585. 819 def render(self, context):
  586. 820 bits = []
  587. 821 for node in self:
  588. 822 if isinstance(node, Node):
  589. 823 ==> bit = self.render_node(node, context)
  590. 824 else:
  591. 825 bit = node
  592. 826 bits.append(force_unicode(bit))
  593. 827 return mark_safe(u''.join(bits))
  594. 828
  595. 829 def get_nodes_by_type(self, nodetype):
  596. Variables:
  597. node = <ExtendsNode: extends "template.html">
  598. self = [<ExtendsNode: extends "template.html">]
  599. bits = []
  600. context = [{'app': <noc.inv.apps.model.views.ModelApplication object at 0x4530810>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x55e6e90>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x552d750>, 'user': <django.utils.functional.SimpleLazyObject object at 0x552ded0>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x55df7d0>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Mari El', 'logo_url': '/static/img/logo_24x24_black.png'}}, {'o': <Model: Container | Inventory>, 'extra': {}}, {'block': <Block Node: content. Contents: [<Text Node: '
  601. <h1>'>, <Variable Node: app.verbose_name_plural>, <Text Node: ': '>, <Variable Node: o.name>, <Text Node: '</h1>
  602. <div class="module"'>, <Block Node: preview. Contents: []>, <Text Node: '
  603. </div>
  604. '>]>}]
  605. ------------------------------------------------------------------------
  606. File: /opt/noc/contrib/lib/django/template/base.py (Line: 134)
  607. Function: _render
  608. 127
  609. 128 def __iter__(self):
  610. 129 for node in self.nodelist:
  611. 130 for subnode in node:
  612. 131 yield subnode
  613. 132
  614. 133 def _render(self, context):
  615. 134 ==> return self.nodelist.render(context)
  616. 135
  617. 136 def render(self, context):
  618. 137 "Display stage -- can be called many times"
  619. 138 context.render_context.push()
  620. 139 try:
  621. 140 return self._render(context)
  622. Variables:
  623. self = <django.template.base.Template object at 0x552d890>
  624. context = [{'app': <noc.inv.apps.model.views.ModelApplication object at 0x4530810>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x55e6e90>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x552d750>, 'user': <django.utils.functional.SimpleLazyObject object at 0x552ded0>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x55df7d0>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Mari El', 'logo_url': '/static/img/logo_24x24_black.png'}}, {'o': <Model: Container | Inventory>, 'extra': {}}, {'block': <Block Node: content. Contents: [<Text Node: '
  625. <h1>'>, <Variable Node: app.verbose_name_plural>, <Text Node: ': '>, <Variable Node: o.name>, <Text Node: '</h1>
  626. <div class="module"'>, <Block Node: preview. Contents: []>, <Text Node: '
  627. </div>
  628. '>]>}]
  629. ------------------------------------------------------------------------
  630. File: /opt/noc/contrib/lib/django/template/loader_tags.py (Line: 123)
  631. Function: render
  632. 116 blocks = dict([(n.name, n) for n in
  633. 117 compiled_parent.nodelist.get_nodes_by_type(BlockNode)])
  634. 118 block_context.add_blocks(blocks)
  635. 119 break
  636. 120
  637. 121 # Call Template._render explicitly so the parser context stays
  638. 122 # the same.
  639. 123 ==> return compiled_parent._render(context)
  640. 124
  641. 125 class BaseIncludeNode(Node):
  642. 126 def __init__(self, *args, **kwargs):
  643. 127 self.extra_context = kwargs.pop('extra_context', {})
  644. 128 self.isolated_context = kwargs.pop('isolated_context', False)
  645. 129 super(BaseIncludeNode, self).__init__(*args, **kwargs)
  646. Variables:
  647. node = <ExtendsNode: extends "template.html">
  648. block_context = <django.template.loader_tags.BlockContext object at 0x55f32d0>
  649. compiled_parent = <django.template.base.Template object at 0x552d890>
  650. self = <ExtendsNode: extends "app/tree/preview.html">
  651. context = [{'app': <noc.inv.apps.model.views.ModelApplication object at 0x4530810>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x55e6e90>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x552d750>, 'user': <django.utils.functional.SimpleLazyObject object at 0x552ded0>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x55df7d0>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Mari El', 'logo_url': '/static/img/logo_24x24_black.png'}}, {'o': <Model: Container | Inventory>, 'extra': {}}, {'block': <Block Node: content. Contents: [<Text Node: '
  652. <h1>'>, <Variable Node: app.verbose_name_plural>, <Text Node: ': '>, <Variable Node: o.name>, <Text Node: '</h1>
  653. <div class="module"'>, <Block Node: preview. Contents: []>, <Text Node: '
  654. </div>
  655. '>]>}]
  656. ------------------------------------------------------------------------
  657. File: /opt/noc/contrib/lib/django/template/base.py (Line: 837)
  658. Function: render_node
  659. 830 "Return a list of all nodes of the given type"
  660. 831 nodes = []
  661. 832 for node in self:
  662. 833 nodes.extend(node.get_nodes_by_type(nodetype))
  663. 834 return nodes
  664. 835
  665. 836 def render_node(self, node, context):
  666. 837 ==> return node.render(context)
  667. 838
  668. 839 class TextNode(Node):
  669. 840 def __init__(self, s):
  670. 841 self.s = s
  671. 842
  672. 843 def __repr__(self):
  673. Variables:
  674. node = <ExtendsNode: extends "app/tree/preview.html">
  675. self = [<ExtendsNode: extends "app/tree/preview.html">]
  676. context = [{'app': <noc.inv.apps.model.views.ModelApplication object at 0x4530810>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x55e6e90>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x552d750>, 'user': <django.utils.functional.SimpleLazyObject object at 0x552ded0>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x55df7d0>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Mari El', 'logo_url': '/static/img/logo_24x24_black.png'}}, {'o': <Model: Container | Inventory>, 'extra': {}}, {'block': <Block Node: content. Contents: [<Text Node: '
  677. <h1>'>, <Variable Node: app.verbose_name_plural>, <Text Node: ': '>, <Variable Node: o.name>, <Text Node: '</h1>
  678. <div class="module"'>, <Block Node: preview. Contents: []>, <Text Node: '
  679. </div>
  680. '>]>}]
  681. ------------------------------------------------------------------------
  682. File: /opt/noc/contrib/lib/django/template/base.py (Line: 823)
  683. Function: render
  684. 816 # extend_nodelist().
  685. 817 contains_nontext = False
  686. 818
  687. 819 def render(self, context):
  688. 820 bits = []
  689. 821 for node in self:
  690. 822 if isinstance(node, Node):
  691. 823 ==> bit = self.render_node(node, context)
  692. 824 else:
  693. 825 bit = node
  694. 826 bits.append(force_unicode(bit))
  695. 827 return mark_safe(u''.join(bits))
  696. 828
  697. 829 def get_nodes_by_type(self, nodetype):
  698. Variables:
  699. node = <ExtendsNode: extends "app/tree/preview.html">
  700. self = [<ExtendsNode: extends "app/tree/preview.html">]
  701. bits = []
  702. context = [{'app': <noc.inv.apps.model.views.ModelApplication object at 0x4530810>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x55e6e90>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x552d750>, 'user': <django.utils.functional.SimpleLazyObject object at 0x552ded0>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x55df7d0>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Mari El', 'logo_url': '/static/img/logo_24x24_black.png'}}, {'o': <Model: Container | Inventory>, 'extra': {}}, {'block': <Block Node: content. Contents: [<Text Node: '
  703. <h1>'>, <Variable Node: app.verbose_name_plural>, <Text Node: ': '>, <Variable Node: o.name>, <Text Node: '</h1>
  704. <div class="module"'>, <Block Node: preview. Contents: []>, <Text Node: '
  705. </div>
  706. '>]>}]
  707. ------------------------------------------------------------------------
  708. File: /opt/noc/contrib/lib/django/template/base.py (Line: 134)
  709. Function: _render
  710. 127
  711. 128 def __iter__(self):
  712. 129 for node in self.nodelist:
  713. 130 for subnode in node:
  714. 131 yield subnode
  715. 132
  716. 133 def _render(self, context):
  717. 134 ==> return self.nodelist.render(context)
  718. 135
  719. 136 def render(self, context):
  720. 137 "Display stage -- can be called many times"
  721. 138 context.render_context.push()
  722. 139 try:
  723. 140 return self._render(context)
  724. Variables:
  725. self = <django.template.base.Template object at 0x552d490>
  726. context = [{'app': <noc.inv.apps.model.views.ModelApplication object at 0x4530810>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x55e6e90>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x552d750>, 'user': <django.utils.functional.SimpleLazyObject object at 0x552ded0>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x55df7d0>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Mari El', 'logo_url': '/static/img/logo_24x24_black.png'}}, {'o': <Model: Container | Inventory>, 'extra': {}}, {'block': <Block Node: content. Contents: [<Text Node: '
  727. <h1>'>, <Variable Node: app.verbose_name_plural>, <Text Node: ': '>, <Variable Node: o.name>, <Text Node: '</h1>
  728. <div class="module"'>, <Block Node: preview. Contents: []>, <Text Node: '
  729. </div>
  730. '>]>}]
  731. ------------------------------------------------------------------------
  732. File: /opt/noc/contrib/lib/django/template/base.py (Line: 140)
  733. Function: render
  734. 133 def _render(self, context):
  735. 134 return self.nodelist.render(context)
  736. 135
  737. 136 def render(self, context):
  738. 137 "Display stage -- can be called many times"
  739. 138 context.render_context.push()
  740. 139 try:
  741. 140 ==> return self._render(context)
  742. 141 finally:
  743. 142 context.render_context.pop()
  744. 143
  745. 144 def compile_string(template_string, origin):
  746. 145 "Compiles template_string into NodeList ready for rendering"
  747. 146 if settings.TEMPLATE_DEBUG:
  748. Variables:
  749. self = <django.template.base.Template object at 0x552d490>
  750. context = [{'app': <noc.inv.apps.model.views.ModelApplication object at 0x4530810>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x55e6e90>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x552d750>, 'user': <django.utils.functional.SimpleLazyObject object at 0x552ded0>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x55df7d0>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Mari El', 'logo_url': '/static/img/logo_24x24_black.png'}}, {'o': <Model: Container | Inventory>, 'extra': {}}, {'block': <Block Node: content. Contents: [<Text Node: '
  751. <h1>'>, <Variable Node: app.verbose_name_plural>, <Text Node: ': '>, <Variable Node: o.name>, <Text Node: '</h1>
  752. <div class="module"'>, <Block Node: preview. Contents: []>, <Text Node: '
  753. </div>
  754. '>]>}]
  755. ------------------------------------------------------------------------
  756. File: /opt/noc/contrib/lib/django/template/loader.py (Line: 176)
  757. Function: render_to_string
  758. 169 t = get_template(template_name)
  759. 170 if not context_instance:
  760. 171 return t.render(Context(dictionary))
  761. 172 # Add the dictionary to the context stack, ensuring it gets removed again
  762. 173 # to keep the context_instance in the same state it started in.
  763. 174 context_instance.update(dictionary)
  764. 175 try:
  765. 176 ==> return t.render(context_instance)
  766. 177 finally:
  767. 178 context_instance.pop()
  768. 179
  769. 180 def select_template(template_name_list):
  770. 181 "Given a list of template names, returns the first that can be loaded."
  771. 182 if not template_name_list:
  772. Variables:
  773. template_name = ['inv/apps/model/templates/preview.html', 'inv/templates/preview.html', 'templates/preview.html']
  774. t = <django.template.base.Template object at 0x552d490>
  775. dictionary = {'o': <Model: Container | Inventory>, 'extra': {}}
  776. context_instance = [{'app': <noc.inv.apps.model.views.ModelApplication object at 0x4530810>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x55e6e90>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x552d750>, 'user': <django.utils.functional.SimpleLazyObject object at 0x552ded0>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x55df7d0>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Mari El', 'logo_url': '/static/img/logo_24x24_black.png'}}, {'o': <Model: Container | Inventory>, 'extra': {}}, {'block': <Block Node: content. Contents: [<Text Node: '
  777. <h1>'>, <Variable Node: app.verbose_name_plural>, <Text Node: ': '>, <Variable Node: o.name>, <Text Node: '</h1>
  778. <div class="module"'>, <Block Node: preview. Contents: []>, <Text Node: '
  779. </div>
  780. '>]>}]
  781. ------------------------------------------------------------------------
  782. File: /opt/noc/contrib/lib/django/shortcuts/__init__.py (Line: 20)
  783. Function: render_to_response
  784. 13
  785. 14 def render_to_response(*args, **kwargs):
  786. 15 """
  787. 16 Returns a HttpResponse whose content is filled with the result of calling
  788. 17 django.template.loader.render_to_string() with the passed arguments.
  789. 18 """
  790. 19 httpresponse_kwargs = {'mimetype': kwargs.pop('mimetype', None)}
  791. 20 ==> return HttpResponse(loader.render_to_string(*args, **kwargs), **httpresponse_kwargs)
  792. 21
  793. 22 def render(request, *args, **kwargs):
  794. 23 """
  795. 24 Returns a HttpResponse whose content is filled with the result of calling
  796. 25 django.template.loader.render_to_string() with the passed arguments.
  797. 26 Uses a RequestContext by default.
  798. Variables:
  799. httpresponse_kwargs = {'mimetype': None}
  800. args = (['inv/apps/model/templates/preview.html', 'inv/templates/preview.html', 'templates/preview.html'], {'o': <Model: Container | Inventory>, 'extra': {}})
  801. kwargs = {'context_instance': [{'app': <noc.inv.apps.model.views.ModelApplication object at 0x4530810>}, {'csrf_token': <django.utils.functional.__proxy__ object at 0x55e6e90>}, {'perms': <django.contrib.auth.context_processors.PermWrapper object at 0x552d750>, 'user': <django.utils.functional.SimpleLazyObject object at 0x552ded0>}, {}, {'LANGUAGES': [('en', 'English'), ('ru', 'Russian')], 'LANGUAGE_BIDI': False, 'LANGUAGE_CODE': 'ru'}, {'MEDIA_URL': ''}, {'messages': <django.contrib.messages.storage.session.SessionStorage object at 0x55df7d0>}, {'setup': {'favicon_mime': 'image/png', 'logo_width': '24', 'logo_height': '24', 'favicon_url': '/static/img/logo_24x24_deep_azure.png', 'installation_name': 'Mari El', 'logo_url': '/static/img/logo_24x24_black.png'}}, {'o': <Model: Container | Inventory>, 'extra': {}}, {'block': <Block Node: content. Contents: [<Text Node: '
  802. <h1>'>, <Variable Node: app.verbose_name_plural>, <Text Node: ': '>, <Variable Node: o.name>, <Text Node: '</h1>
  803. <div class="module"'>, <Block Node: preview. Contents: []>, <Text Node: '
  804. </div>
  805. '>]>}]}
  806. ------------------------------------------------------------------------
  807. File: /opt/noc/lib/app/application.py (Line: 233)
  808. Function: render
  809. 226 def render(self, request, template, dict={}, **kwargs):
  810. 227 """
  811. 228 Render template within context
  812. 229 """
  813. 230 return render_to_response(self.get_template_path(template),
  814. 231 dict if dict else kwargs,
  815. 232 context_instance=RequestContext(request,
  816. 233 ==> {"app": self}))
  817. 234
  818. 235 def render_template(self, template, dict={}, **kwargs):
  819. 236 """
  820. 237 Render template to string
  821. 238 """
  822. 239 tp = self.get_template_path(template)
  823. Variables:
  824. request = <WSGIRequest
  825. path:/inv/model/50a0bd977e85c96a24c8b3d7/,
  826. GET:<QueryDict: {}>,
  827. POST:<QueryDict: {}>,
  828. COOKIES:{'SelectedMonitor': 'serviceMonitor',
  829. 'csrftoken': 'IYZ6pdYLnAC5QOXnjGHU5gZCMS7bGKzp',
  830. 'defaultSnapshotDetailsTab': 'DeviceDetails',
  831. 'passwordForAutomaticSignin': 'admin',
  832. 'sessionid': 'f4934ada7c1d02998624769d9c309993',
  833. 'signInAutomatically': 'true',
  834. 'userNameForAutomaticSignin': 'admin'},
  835. META:{'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  836. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  837. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3',
  838. 'HTTP_CONNECTION': 'close',
  839. 'HTTP_COOKIE': 'userNameForAutomaticSignin=admin; passwordForAutomaticSignin=admin; signInAutomatically=true; defaultSnapshotDetailsTab=DeviceDetails; SelectedMonitor=serviceMonitor; sessionid=f4934ada7c1d02998624769d9c309993; csrftoken=IYZ6pdYLnAC5QOXnjGHU5gZCMS7bGKzp',
  840. 'HTTP_HOST': '127.0.0.1:8000',
  841. 'HTTP_REFERER': 'https://77.40.0.12/inv/model/',
  842. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; rv:16.0) Gecko/20121026 Firefox/16.0 SeaMonkey/2.13.2',
  843. 'PATH_INFO': u'/inv/model/50a0bd977e85c96a24c8b3d7/',
  844. 'QUERY_STRING': '',
  845. 'REMOTE_ADDR': '127.0.0.1',
  846. 'REQUEST_METHOD': 'GET',
  847. 'SCRIPT_NAME': u'',
  848. 'SERVER_NAME': '127.0.0.1',
  849. 'SERVER_PORT': '8000',
  850. 'SERVER_PROTOCOL': 'HTTP/1.0',
  851. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x250a8a0>,
  852. 'wsgi.input': <io.BytesIO object at 0x5477470>,
  853. 'wsgi.multiprocess': True,
  854. 'wsgi.multithread': False,
  855. 'wsgi.run_once': False,
  856. 'wsgi.url_scheme': 'http',
  857. 'wsgi.version': (1, 0)}>
  858. self = <noc.inv.apps.model.views.ModelApplication object at 0x4530810>
  859. dict = {}
  860. template = 'preview.html'
  861. kwargs = {'o': <Model: Container | Inventory>, 'extra': {}}
  862. ------------------------------------------------------------------------
  863. File: /opt/noc/lib/app/treeapplication.py (Line: 188)
  864. Function: view_preview
  865. 181 """
  866. 182 Render item preview
  867. 183 """
  868. 184 o = self.get_object(object_id)
  869. 185 if not o:
  870. 186 return self.response_not_found("Object not found")
  871. 187 return self.render(request, "preview.html",
  872. 188 ==> o=o, extra=self.get_preview_extra(o))
  873. 189
  874. 190 @view(url="^popup/$", url_name="popup", access=HasPerm("view"))
  875. 191 def view_popup(self, request):
  876. 192 if request.GET and "choose_id" in request.GET:
  877. 193 choose_id = request.GET["choose_id"]
  878. 194 else:
  879. Variables:
  880. self = <noc.inv.apps.model.views.ModelApplication object at 0x4530810>
  881. request = <WSGIRequest
  882. path:/inv/model/50a0bd977e85c96a24c8b3d7/,
  883. GET:<QueryDict: {}>,
  884. POST:<QueryDict: {}>,
  885. COOKIES:{'SelectedMonitor': 'serviceMonitor',
  886. 'csrftoken': 'IYZ6pdYLnAC5QOXnjGHU5gZCMS7bGKzp',
  887. 'defaultSnapshotDetailsTab': 'DeviceDetails',
  888. 'passwordForAutomaticSignin': 'admin',
  889. 'sessionid': 'f4934ada7c1d02998624769d9c309993',
  890. 'signInAutomatically': 'true',
  891. 'userNameForAutomaticSignin': 'admin'},
  892. META:{'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  893. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  894. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3',
  895. 'HTTP_CONNECTION': 'close',
  896. 'HTTP_COOKIE': 'userNameForAutomaticSignin=admin; passwordForAutomaticSignin=admin; signInAutomatically=true; defaultSnapshotDetailsTab=DeviceDetails; SelectedMonitor=serviceMonitor; sessionid=f4934ada7c1d02998624769d9c309993; csrftoken=IYZ6pdYLnAC5QOXnjGHU5gZCMS7bGKzp',
  897. 'HTTP_HOST': '127.0.0.1:8000',
  898. 'HTTP_REFERER': 'https://77.40.0.12/inv/model/',
  899. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; rv:16.0) Gecko/20121026 Firefox/16.0 SeaMonkey/2.13.2',
  900. 'PATH_INFO': u'/inv/model/50a0bd977e85c96a24c8b3d7/',
  901. 'QUERY_STRING': '',
  902. 'REMOTE_ADDR': '127.0.0.1',
  903. 'REQUEST_METHOD': 'GET',
  904. 'SCRIPT_NAME': u'',
  905. 'SERVER_NAME': '127.0.0.1',
  906. 'SERVER_PORT': '8000',
  907. 'SERVER_PROTOCOL': 'HTTP/1.0',
  908. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x250a8a0>,
  909. 'wsgi.input': <io.BytesIO object at 0x5477470>,
  910. 'wsgi.multiprocess': True,
  911. 'wsgi.multithread': False,
  912. 'wsgi.run_once': False,
  913. 'wsgi.url_scheme': 'http',
  914. 'wsgi.version': (1, 0)}>
  915. object_id = u'50a0bd977e85c96a24c8b3d7'
  916. o = <Model: Container | Inventory>
  917. ------------------------------------------------------------------------
  918. File: /opt/noc/lib/app/site.py (Line: 232)
  919. Function: inner
  920. 225 for k, v in request.POST.lists())
  921. 226 elif request.method == "GET":
  922. 227 a = dict((k, v[0] if len(v) == 1 else v)
  923. 228 for k, v in request.GET.lists())
  924. 229 logging.debug("API %s %s %s" % (request.method,
  925. 230 request.path, a))
  926. 231 # Call handler
  927. 232 ==> r = v(request, *args, **kwargs)
  928. 233 # Dump SQL statements
  929. 234 if self.log_sql_statements:
  930. 235 from django.db import connections
  931. 236 tsc = 0
  932. 237 sc = defaultdict(int)
  933. 238 for conn in connections.all():
  934. Variables:
  935. args = ()
  936. view_map = {'PUT': <bound method ModelApplication.view_preview of <noc.inv.apps.model.views.ModelApplication object at 0x4530810>>, 'POST': <bound method ModelApplication.view_preview of <noc.inv.apps.model.views.ModelApplication object at 0x4530810>>, 'GET': <bound method ModelApplication.view_preview of <noc.inv.apps.model.views.ModelApplication object at 0x4530810>>, 'DELETE': <bound method ModelApplication.view_preview of <noc.inv.apps.model.views.ModelApplication object at 0x4530810>>}
  937. Form = <class 'django.forms.forms.Form'>
  938. DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
  939. self = <noc.lib.app.site.Site object at 0x2b0ed50>
  940. v = <bound method ModelApplication.view_preview of <noc.inv.apps.model.views.ModelApplication object at 0x4530810>>
  941. request = <WSGIRequest
  942. path:/inv/model/50a0bd977e85c96a24c8b3d7/,
  943. GET:<QueryDict: {}>,
  944. POST:<QueryDict: {}>,
  945. COOKIES:{'SelectedMonitor': 'serviceMonitor',
  946. 'csrftoken': 'IYZ6pdYLnAC5QOXnjGHU5gZCMS7bGKzp',
  947. 'defaultSnapshotDetailsTab': 'DeviceDetails',
  948. 'passwordForAutomaticSignin': 'admin',
  949. 'sessionid': 'f4934ada7c1d02998624769d9c309993',
  950. 'signInAutomatically': 'true',
  951. 'userNameForAutomaticSignin': 'admin'},
  952. META:{'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  953. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  954. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.5,en;q=0.3',
  955. 'HTTP_CONNECTION': 'close',
  956. 'HTTP_COOKIE': 'userNameForAutomaticSignin=admin; passwordForAutomaticSignin=admin; signInAutomatically=true; defaultSnapshotDetailsTab=DeviceDetails; SelectedMonitor=serviceMonitor; sessionid=f4934ada7c1d02998624769d9c309993; csrftoken=IYZ6pdYLnAC5QOXnjGHU5gZCMS7bGKzp',
  957. 'HTTP_HOST': '127.0.0.1:8000',
  958. 'HTTP_REFERER': 'https://77.40.0.12/inv/model/',
  959. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; rv:16.0) Gecko/20121026 Firefox/16.0 SeaMonkey/2.13.2',
  960. 'PATH_INFO': u'/inv/model/50a0bd977e85c96a24c8b3d7/',
  961. 'QUERY_STRING': '',
  962. 'REMOTE_ADDR': '127.0.0.1',
  963. 'REQUEST_METHOD': 'GET',
  964. 'SCRIPT_NAME': u'',
  965. 'SERVER_NAME': '127.0.0.1',
  966. 'SERVER_PORT': '8000',
  967. 'SERVER_PROTOCOL': 'HTTP/1.0',
  968. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x250a8a0>,
  969. 'wsgi.input': <io.BytesIO object at 0x5477470>,
  970. 'wsgi.multiprocess': True,
  971. 'wsgi.multithread': False,
  972. 'wsgi.run_once': False,
  973. 'wsgi.url_scheme': 'http',
  974. 'wsgi.version': (1, 0)}>
  975. to_log_api_call = False
  976. InterfaceTypeError = <class 'noc.sa.interfaces.base.InterfaceTypeError'>
  977. PermissionDenied = <class 'noc.lib.app.access.PermissionDenied'>
  978. kwargs = {'object_id': u'50a0bd977e85c96a24c8b3d7'}
  979. app = <noc.inv.apps.model.views.ModelApplication object at 0x4530810>
  980. ------------------------------------------------------------------------
  981. END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement