Advertisement
Guest User

Untitled

a guest
Apr 29th, 2015
255
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 25.15 KB | None | 0 0
  1. UNHANDLED EXCEPTION (2015-04-29 16:21:29.522038)
  2. BRANCH: develop TIP: e6d5d4ef183f
  3. PROCESS: ./scripts/noc-web.py
  4. ERROR FINGERPRINT: 1b0ef63b-8027-5640-afa7-95d1e234f0b2
  5. WORKING DIRECTORY: /usr/local/noc
  6. EXCEPTION: <class 'django.core.exceptions.PermissionDenied'>
  7. START OF TRACEBACK
  8. ------------------------------------------------------------------------
  9. File: lib/python2.7/site-packages/django/contrib/admin/actions.py (Line: 28)
  10. Function: delete_selected
  11. 21 Next, it delets all selected objects and redirects back to the change list.
  12. 22 """
  13. 23 opts = modeladmin.model._meta
  14. 24 app_label = opts.app_label
  15. 25
  16. 26 # Check that the user has delete permission for the actual model
  17. 27 if not modeladmin.has_delete_permission(request):
  18. 28 ==> raise PermissionDenied
  19. 29
  20. 30 using = router.db_for_write(modeladmin.model)
  21. 31
  22. 32 # Populate deletable_objects, a data structure of all related objects that
  23. 33 # will also be deleted.
  24. 34 deletable_objects, perms_needed, protected = get_deleted_objects(
  25. Variables:
  26. request =
  27. <WSGIRequest
  28. path:/main/user/,
  29. GET:<QueryDict: {}>,
  30. POST:<QueryDict: {u'action': [u'delete_selected'], u'select_across': [u'0'], u'csrfmiddlewaretoken': [u'elY95gtQ9CLdFObPxKU9g4HOpHvCsjvO'], u'_selected_action': [u'3'], u'index': [u'0']}>,
  31. COOKIES:{'csrftoken': 'elY95gtQ9CLdFObPxKU9g4HOpHvCsjvO',
  32. 'sessionid': '1244c50af4246d88f606fb93fc179631'},
  33. META:{'CONTENT_LENGTH': '118',
  34. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  35. 'CSRF_COOKIE': 'elY95gtQ9CLdFObPxKU9g4HOpHvCsjvO',
  36. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
  37. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  38. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
  39. 'HTTP_CACHE_CONTROL': 'max-age=0',
  40. 'HTTP_CONNECTION': 'close',
  41. 'HTTP_COOKIE': 'sessionid=1244c50af4246d88f606fb93fc179631; csrftoken=elY95gtQ9CLdFObPxKU9g4HOpHvCsjvO',
  42. 'HTTP_HOST': '10.34.58.156',
  43. 'HTTP_ORIGIN': 'http://10.34.58.156',
  44. 'HTTP_REFERER': 'http://10.34.58.156/main/user/',
  45. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36',
  46. 'HTTP_X_SCHEME': 'http',
  47. 'PATH_INFO': u'/main/user/',
  48. 'QUERY_STRING': '',
  49. 'REMOTE_ADDR': '127.0.0.1',
  50. 'REQUEST_METHOD': 'POST',
  51. 'SCRIPT_NAME': u'',
  52. 'SERVER_NAME': '10.34.58.156',
  53. 'SERVER_PORT': '80',
  54. 'SERVER_PROTOCOL': 'HTTP/1.0',
  55. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x80982e9c0>,
  56. 'wsgi.input': <_io.BytesIO object at 0x812520830>,
  57. 'wsgi.multiprocess': True,
  58. 'wsgi.multithread': False,
  59. 'wsgi.run_once': False,
  60. 'wsgi.url_scheme': 'http',
  61. 'wsgi.version': (1, 0)}>
  62. queryset = [<User: test01>]
  63. modeladmin = <noc.main.apps.user.views.UserAdmin object at 0x80d893210>
  64. opts = <Options for User>
  65. app_label = 'auth'
  66. ------------------------------------------------------------------------
  67. File: lib/python2.7/site-packages/django/contrib/admin/options.py (Line: 928)
  68. Function: response_action
  69. 921 self.message_user(request, msg)
  70. 922 return None
  71. 923
  72. 924 if not select_across:
  73. 925 # Perform the action only on the selected objects
  74. 926 queryset = queryset.filter(pk__in=selected)
  75. 927
  76. 928 ==> response = func(self, request, queryset)
  77. 929
  78. 930 # Actions may return an HttpResponse, which will be used as the
  79. 931 # response from the POST. If not, we'll be a good little HTTP
  80. 932 # citizen and redirect back to the changelist page.
  81. 933 if isinstance(response, HttpResponse):
  82. 934 return response
  83. Variables:
  84. action_index = 0
  85. description = <django.utils.functional.__proxy__ object at 0x80aba0a50>
  86. queryset = [<User: test01>]
  87. self = <noc.main.apps.user.views.UserAdmin object at 0x80d893210>
  88. selected = [u'3']
  89. action_form = <django.contrib.admin.helpers.ActionForm object at 0x8126d9150>
  90. request =
  91. <WSGIRequest
  92. path:/main/user/,
  93. GET:<QueryDict: {}>,
  94. POST:<QueryDict: {u'action': [u'delete_selected'], u'select_across': [u'0'], u'csrfmiddlewaretoken': [u'elY95gtQ9CLdFObPxKU9g4HOpHvCsjvO'], u'_selected_action': [u'3'], u'index': [u'0']}>,
  95. COOKIES:{'csrftoken': 'elY95gtQ9CLdFObPxKU9g4HOpHvCsjvO',
  96. 'sessionid': '1244c50af4246d88f606fb93fc179631'},
  97. META:{'CONTENT_LENGTH': '118',
  98. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  99. 'CSRF_COOKIE': 'elY95gtQ9CLdFObPxKU9g4HOpHvCsjvO',
  100. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
  101. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  102. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
  103. 'HTTP_CACHE_CONTROL': 'max-age=0',
  104. 'HTTP_CONNECTION': 'close',
  105. 'HTTP_COOKIE': 'sessionid=1244c50af4246d88f606fb93fc179631; csrftoken=elY95gtQ9CLdFObPxKU9g4HOpHvCsjvO',
  106. 'HTTP_HOST': '10.34.58.156',
  107. 'HTTP_ORIGIN': 'http://10.34.58.156',
  108. 'HTTP_REFERER': 'http://10.34.58.156/main/user/',
  109. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36',
  110. 'HTTP_X_SCHEME': 'http',
  111. 'PATH_INFO': u'/main/user/',
  112. 'QUERY_STRING': '',
  113. 'REMOTE_ADDR': '127.0.0.1',
  114. 'REQUEST_METHOD': 'POST',
  115. 'SCRIPT_NAME': u'',
  116. 'SERVER_NAME': '10.34.58.156',
  117. 'SERVER_PORT': '80',
  118. 'SERVER_PROTOCOL': 'HTTP/1.0',
  119. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x80982e9c0>,
  120. 'wsgi.input': <_io.BytesIO object at 0x812520830>,
  121. 'wsgi.multiprocess': True,
  122. 'wsgi.multithread': False,
  123. 'wsgi.run_once': False,
  124. 'wsgi.url_scheme': 'http',
  125. 'wsgi.version': (1, 0)}>
  126. select_across = False
  127. func = <function delete_selected at 0x80aba2140>
  128. action = u'delete_selected'
  129. data =
  130. <QueryDict: {u'action': [u'delete_selected', u'delete_selected'], u'select_across': [u'0'], u'csrfmiddlewaretoken': [u'elY95gtQ9CLdFObPxKU9g4HOpHvCsjvO']}>
  131. name = 'delete_selected'
  132. ------------------------------------------------------------------------
  133. File: lib/python2.7/site-packages/django/contrib/admin/options.py (Line: 1173)
  134. Function: changelist_view
  135. 1166 action_failed = False
  136. 1167 selected = request.POST.getlist(helpers.ACTION_CHECKBOX_NAME)
  137. 1168
  138. 1169 # Actions with no confirmation
  139. 1170 if (actions and request.method == 'POST' and
  140. 1171 'index' in request.POST and '_save' not in request.POST):
  141. 1172 if selected:
  142. 1173 ==> response = self.response_action(request, queryset=cl.get_query_set(request))
  143. 1174 if response:
  144. 1175 return response
  145. 1176 else:
  146. 1177 action_failed = True
  147. 1178 else:
  148. 1179 msg = _("Items must be selected in order to perform "
  149. Variables:
  150. action_failed = False
  151. cl = <django.contrib.admin.views.main.ChangeList object at 0x8126cdbd0>
  152. ChangeList = <class 'django.contrib.admin.views.main.ChangeList'>
  153. selected = [u'3']
  154. request =
  155. <WSGIRequest
  156. path:/main/user/,
  157. GET:<QueryDict: {}>,
  158. POST:<QueryDict: {u'action': [u'delete_selected'], u'select_across': [u'0'], u'csrfmiddlewaretoken': [u'elY95gtQ9CLdFObPxKU9g4HOpHvCsjvO'], u'_selected_action': [u'3'], u'index': [u'0']}>,
  159. COOKIES:{'csrftoken': 'elY95gtQ9CLdFObPxKU9g4HOpHvCsjvO',
  160. 'sessionid': '1244c50af4246d88f606fb93fc179631'},
  161. META:{'CONTENT_LENGTH': '118',
  162. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  163. 'CSRF_COOKIE': 'elY95gtQ9CLdFObPxKU9g4HOpHvCsjvO',
  164. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
  165. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  166. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
  167. 'HTTP_CACHE_CONTROL': 'max-age=0',
  168. 'HTTP_CONNECTION': 'close',
  169. 'HTTP_COOKIE': 'sessionid=1244c50af4246d88f606fb93fc179631; csrftoken=elY95gtQ9CLdFObPxKU9g4HOpHvCsjvO',
  170. 'HTTP_HOST': '10.34.58.156',
  171. 'HTTP_ORIGIN': 'http://10.34.58.156',
  172. 'HTTP_REFERER': 'http://10.34.58.156/main/user/',
  173. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36',
  174. 'HTTP_X_SCHEME': 'http',
  175. 'PATH_INFO': u'/main/user/',
  176. 'QUERY_STRING': '',
  177. 'REMOTE_ADDR': '127.0.0.1',
  178. 'REQUEST_METHOD': 'POST',
  179. 'SCRIPT_NAME': u'',
  180. 'SERVER_NAME': '10.34.58.156',
  181. 'SERVER_PORT': '80',
  182. 'SERVER_PROTOCOL': 'HTTP/1.0',
  183. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x80982e9c0>,
  184. 'wsgi.input': <_io.BytesIO object at 0x812520830>,
  185. 'wsgi.multiprocess': True,
  186. 'wsgi.multithread': False,
  187. 'wsgi.run_once': False,
  188. 'wsgi.url_scheme': 'http',
  189. 'wsgi.version': (1, 0)}>
  190. actions =
  191. {'delete_selected': (<function delete_selected at 0x80aba2140>, 'delete_selected', <django.utils.functional.__proxy__ object at 0x80aba0a50>), 'export_selected_csv': (<function admin_csv_export at 0x80d303410>, 'export_selected_csv', 'Export selected %(verbose_name_plural)s to CSV')}
  192. app_label = 'auth'
  193. self = <noc.main.apps.user.views.UserAdmin object at 0x80d893210>
  194. list_display =
  195. ['action_checkbox',
  196. 'username',
  197. 'email',
  198. 'first_name',
  199. 'last_name',
  200. 'is_active',
  201. 'is_superuser']
  202. list_display_links = ['username']
  203. extra_context =
  204. {'app': <noc.main.apps.user.views.UserApplication object at 0x80d893090>}
  205. ERROR_FLAG = 'e'
  206. opts = <Options for User>
  207. ------------------------------------------------------------------------
  208. File: lib/python2.7/site-packages/django/utils/decorators.py (Line: 21)
  209. Function: bound_func
  210. 14 """
  211. 15 # 'func' is a function at the time it is passed to _dec, but will eventually
  212. 16 # be a method of the class it is defined it.
  213. 17 def _dec(func):
  214. 18 def _wrapper(self, *args, **kwargs):
  215. 19 @decorator
  216. 20 def bound_func(*args2, **kwargs2):
  217. 21 ==> return func(self, *args2, **kwargs2)
  218. 22 # bound_func has the signature that 'decorator' expects i.e. no
  219. 23 # 'self' argument, but it is a closure over self so it can call
  220. 24 # 'func' correctly.
  221. 25 return bound_func(*args, **kwargs)
  222. 26 # In case 'decorator' adds attributes to the function it decorates, we
  223. 27 # want to copy those. We don't have access to bound_func in this scope,
  224. Variables:
  225. args2 =
  226. (<WSGIRequest
  227. path:/main/user/,
  228. GET:<QueryDict: {}>,
  229. POST:<QueryDict: {u'action': [u'delete_selected'], u'select_across': [u'0'], u'csrfmiddlewaretoken': [u'elY95gtQ9CLdFObPxKU9g4HOpHvCsjvO'], u'_selected_action': [u'3'], u'index': [u'0']}>,
  230. COOKIES:{'csrftoken': 'elY95gtQ9CLdFObPxKU9g4HOpHvCsjvO',
  231. 'sessionid': '1244c50af4246d88f606fb93fc179631'},
  232. META:{'CONTENT_LENGTH': '118',
  233. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  234. 'CSRF_COOKIE': 'elY95gtQ9CLdFObPxKU9g4HOpHvCsjvO',
  235. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
  236. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  237. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
  238. 'HTTP_CACHE_CONTROL': 'max-age=0',
  239. 'HTTP_CONNECTION': 'close',
  240. 'HTTP_COOKIE': 'sessionid=1244c50af4246d88f606fb93fc179631; csrftoken=elY95gtQ9CLdFObPxKU9g4HOpHvCsjvO',
  241. 'HTTP_HOST': '10.34.58.156',
  242. 'HTTP_ORIGIN': 'http://10.34.58.156',
  243. 'HTTP_REFERER': 'http://10.34.58.156/main/user/',
  244. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36',
  245. 'HTTP_X_SCHEME': 'http',
  246. 'PATH_INFO': u'/main/user/',
  247. 'QUERY_STRING': '',
  248. 'REMOTE_ADDR': '127.0.0.1',
  249. 'REQUEST_METHOD': 'POST',
  250. 'SCRIPT_NAME': u'',
  251. 'SERVER_NAME': '10.34.58.156',
  252. 'SERVER_PORT': '80',
  253. 'SERVER_PROTOCOL': 'HTTP/1.0',
  254. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x80982e9c0>,
  255. 'wsgi.input': <_io.BytesIO object at 0x812520830>,
  256. 'wsgi.multiprocess': True,
  257. 'wsgi.multithread': False,
  258. 'wsgi.run_once': False,
  259. 'wsgi.url_scheme': 'http',
  260. 'wsgi.version': (1, 0)}>,
  261. {'app': <noc.main.apps.user.views.UserApplication object at 0x80d893090>})
  262. func = <function changelist_view at 0x80ab9c5f0>
  263. self = <noc.main.apps.user.views.UserAdmin object at 0x80d893210>
  264. kwargs2 = {}
  265. ------------------------------------------------------------------------
  266. File: lib/python2.7/site-packages/django/utils/decorators.py (Line: 91)
  267. Function: _wrapped_view
  268. 84 if result is not None:
  269. 85 return result
  270. 86 if hasattr(middleware, 'process_view'):
  271. 87 result = middleware.process_view(request, view_func, args, kwargs)
  272. 88 if result is not None:
  273. 89 return result
  274. 90 try:
  275. 91 ==> response = view_func(request, *args, **kwargs)
  276. 92 except Exception, e:
  277. 93 if hasattr(middleware, 'process_exception'):
  278. 94 result = middleware.process_exception(request, e)
  279. 95 if result is not None:
  280. 96 return result
  281. 97 raise
  282. Variables:
  283. e = PermissionDenied()
  284. middleware = <django.middleware.csrf.CsrfViewMiddleware object at 0x80ab62750>
  285. args =
  286. ({'app': <noc.main.apps.user.views.UserApplication object at 0x80d893090>},)
  287. request =
  288. <WSGIRequest
  289. path:/main/user/,
  290. GET:<QueryDict: {}>,
  291. POST:<QueryDict: {u'action': [u'delete_selected'], u'select_across': [u'0'], u'csrfmiddlewaretoken': [u'elY95gtQ9CLdFObPxKU9g4HOpHvCsjvO'], u'_selected_action': [u'3'], u'index': [u'0']}>,
  292. COOKIES:{'csrftoken': 'elY95gtQ9CLdFObPxKU9g4HOpHvCsjvO',
  293. 'sessionid': '1244c50af4246d88f606fb93fc179631'},
  294. META:{'CONTENT_LENGTH': '118',
  295. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  296. 'CSRF_COOKIE': 'elY95gtQ9CLdFObPxKU9g4HOpHvCsjvO',
  297. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
  298. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  299. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
  300. 'HTTP_CACHE_CONTROL': 'max-age=0',
  301. 'HTTP_CONNECTION': 'close',
  302. 'HTTP_COOKIE': 'sessionid=1244c50af4246d88f606fb93fc179631; csrftoken=elY95gtQ9CLdFObPxKU9g4HOpHvCsjvO',
  303. 'HTTP_HOST': '10.34.58.156',
  304. 'HTTP_ORIGIN': 'http://10.34.58.156',
  305. 'HTTP_REFERER': 'http://10.34.58.156/main/user/',
  306. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36',
  307. 'HTTP_X_SCHEME': 'http',
  308. 'PATH_INFO': u'/main/user/',
  309. 'QUERY_STRING': '',
  310. 'REMOTE_ADDR': '127.0.0.1',
  311. 'REQUEST_METHOD': 'POST',
  312. 'SCRIPT_NAME': u'',
  313. 'SERVER_NAME': '10.34.58.156',
  314. 'SERVER_PORT': '80',
  315. 'SERVER_PROTOCOL': 'HTTP/1.0',
  316. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x80982e9c0>,
  317. 'wsgi.input': <_io.BytesIO object at 0x812520830>,
  318. 'wsgi.multiprocess': True,
  319. 'wsgi.multithread': False,
  320. 'wsgi.run_once': False,
  321. 'wsgi.url_scheme': 'http',
  322. 'wsgi.version': (1, 0)}>
  323. result = None
  324. kwargs = {}
  325. view_func = <function bound_func at 0x812608320>
  326. ------------------------------------------------------------------------
  327. File: lib/python2.7/site-packages/django/utils/decorators.py (Line: 25)
  328. Function: _wrapper
  329. 18 def _wrapper(self, *args, **kwargs):
  330. 19 @decorator
  331. 20 def bound_func(*args2, **kwargs2):
  332. 21 return func(self, *args2, **kwargs2)
  333. 22 # bound_func has the signature that 'decorator' expects i.e. no
  334. 23 # 'self' argument, but it is a closure over self so it can call
  335. 24 # 'func' correctly.
  336. 25 ==> return bound_func(*args, **kwargs)
  337. 26 # In case 'decorator' adds attributes to the function it decorates, we
  338. 27 # want to copy those. We don't have access to bound_func in this scope,
  339. 28 # but we can cheat by using it on a dummy function.
  340. 29 @decorator
  341. 30 def dummy(*args, **kwargs):
  342. 31 pass
  343. Variables:
  344. self = <noc.main.apps.user.views.UserAdmin object at 0x80d893210>
  345. args =
  346. (<WSGIRequest
  347. path:/main/user/,
  348. GET:<QueryDict: {}>,
  349. POST:<QueryDict: {u'action': [u'delete_selected'], u'select_across': [u'0'], u'csrfmiddlewaretoken': [u'elY95gtQ9CLdFObPxKU9g4HOpHvCsjvO'], u'_selected_action': [u'3'], u'index': [u'0']}>,
  350. COOKIES:{'csrftoken': 'elY95gtQ9CLdFObPxKU9g4HOpHvCsjvO',
  351. 'sessionid': '1244c50af4246d88f606fb93fc179631'},
  352. META:{'CONTENT_LENGTH': '118',
  353. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  354. 'CSRF_COOKIE': 'elY95gtQ9CLdFObPxKU9g4HOpHvCsjvO',
  355. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
  356. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  357. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
  358. 'HTTP_CACHE_CONTROL': 'max-age=0',
  359. 'HTTP_CONNECTION': 'close',
  360. 'HTTP_COOKIE': 'sessionid=1244c50af4246d88f606fb93fc179631; csrftoken=elY95gtQ9CLdFObPxKU9g4HOpHvCsjvO',
  361. 'HTTP_HOST': '10.34.58.156',
  362. 'HTTP_ORIGIN': 'http://10.34.58.156',
  363. 'HTTP_REFERER': 'http://10.34.58.156/main/user/',
  364. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36',
  365. 'HTTP_X_SCHEME': 'http',
  366. 'PATH_INFO': u'/main/user/',
  367. 'QUERY_STRING': '',
  368. 'REMOTE_ADDR': '127.0.0.1',
  369. 'REQUEST_METHOD': 'POST',
  370. 'SCRIPT_NAME': u'',
  371. 'SERVER_NAME': '10.34.58.156',
  372. 'SERVER_PORT': '80',
  373. 'SERVER_PROTOCOL': 'HTTP/1.0',
  374. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x80982e9c0>,
  375. 'wsgi.input': <_io.BytesIO object at 0x812520830>,
  376. 'wsgi.multiprocess': True,
  377. 'wsgi.multithread': False,
  378. 'wsgi.run_once': False,
  379. 'wsgi.url_scheme': 'http',
  380. 'wsgi.version': (1, 0)}>,
  381. {'app': <noc.main.apps.user.views.UserApplication object at 0x80d893090>})
  382. bound_func = <function bound_func at 0x812608050>
  383. func = <function changelist_view at 0x80ab9c5f0>
  384. kwargs = {}
  385. decorator = <function csrf_protect at 0x80ab828c0>
  386. ------------------------------------------------------------------------
  387. File: lib/app/modelapplication.py (Line: 141)
  388. Function: view_changelist
  389. 134 self.model._meta.object_name.lower())
  390. 135
  391. 136 @view(url=r"^$", url_name="admin:%s_%s_changelist", access=HasPerm("change"),
  392. 137 menu=get_menu)
  393. 138 def view_changelist(self, request, extra_context=None):
  394. 139 """Display changelist"""
  395. 140 return self.admin.changelist_view(request,
  396. 141 ==> self.get_context(extra_context))
  397. 142
  398. 143 @view(url=r"^add/$", url_name="admin:%s_%s_add", access=HasPerm("add"))
  399. 144 def view_add(self, request, form_url="", extra_context=None):
  400. 145 """Display add form"""
  401. 146 return self.admin.add_view(
  402. 147 request,
  403. Variables:
  404. self = <noc.main.apps.user.views.UserApplication object at 0x80d893090>
  405. extra_context = None
  406. request =
  407. <WSGIRequest
  408. path:/main/user/,
  409. GET:<QueryDict: {}>,
  410. POST:<QueryDict: {u'action': [u'delete_selected'], u'select_across': [u'0'], u'csrfmiddlewaretoken': [u'elY95gtQ9CLdFObPxKU9g4HOpHvCsjvO'], u'_selected_action': [u'3'], u'index': [u'0']}>,
  411. COOKIES:{'csrftoken': 'elY95gtQ9CLdFObPxKU9g4HOpHvCsjvO',
  412. 'sessionid': '1244c50af4246d88f606fb93fc179631'},
  413. META:{'CONTENT_LENGTH': '118',
  414. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  415. 'CSRF_COOKIE': 'elY95gtQ9CLdFObPxKU9g4HOpHvCsjvO',
  416. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
  417. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  418. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
  419. 'HTTP_CACHE_CONTROL': 'max-age=0',
  420. 'HTTP_CONNECTION': 'close',
  421. 'HTTP_COOKIE': 'sessionid=1244c50af4246d88f606fb93fc179631; csrftoken=elY95gtQ9CLdFObPxKU9g4HOpHvCsjvO',
  422. 'HTTP_HOST': '10.34.58.156',
  423. 'HTTP_ORIGIN': 'http://10.34.58.156',
  424. 'HTTP_REFERER': 'http://10.34.58.156/main/user/',
  425. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36',
  426. 'HTTP_X_SCHEME': 'http',
  427. 'PATH_INFO': u'/main/user/',
  428. 'QUERY_STRING': '',
  429. 'REMOTE_ADDR': '127.0.0.1',
  430. 'REQUEST_METHOD': 'POST',
  431. 'SCRIPT_NAME': u'',
  432. 'SERVER_NAME': '10.34.58.156',
  433. 'SERVER_PORT': '80',
  434. 'SERVER_PROTOCOL': 'HTTP/1.0',
  435. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x80982e9c0>,
  436. 'wsgi.input': <_io.BytesIO object at 0x812520830>,
  437. 'wsgi.multiprocess': True,
  438. 'wsgi.multithread': False,
  439. 'wsgi.run_once': False,
  440. 'wsgi.url_scheme': 'http',
  441. 'wsgi.version': (1, 0)}>
  442. ------------------------------------------------------------------------
  443. File: lib/app/site.py (Line: 248)
  444. Function: inner
  445. 241 a = dict((k, v[0] if len(v) == 1 else v)
  446. 242 for k, v in request.GET.lists())
  447. 243 app_logger.debug("API %s %s %s",
  448. 244 request.method, request.path, a)
  449. 245 # Call handler
  450. 246 v.__dict__["hits_metric"] += 1
  451. 247 with v.__dict__["time_metric"].timer():
  452. 248 ==> r = v(request, *args, **kwargs)
  453. 249 # Dump SQL statements
  454. 250 if self.log_sql_statements:
  455. 251 from django.db import connections
  456. 252 tsc = 0
  457. 253 sc = defaultdict(int)
  458. 254 for conn in connections.all():
  459. Variables:
  460. args = ()
  461. view_map =
  462. {'DELETE': <bound method UserApplication.view_changelist of <noc.main.apps.user.views.UserApplication object at 0x80d893090>>,
  463. 'GET': <bound method UserApplication.view_changelist of <noc.main.apps.user.views.UserApplication object at 0x80d893090>>,
  464. 'POST': <bound method UserApplication.view_changelist of <noc.main.apps.user.views.UserApplication object at 0x80d893090>>,
  465. 'PUT': <bound method UserApplication.view_changelist of <noc.main.apps.user.views.UserApplication object at 0x80d893090>>}
  466. Form = <class 'django.forms.forms.Form'>
  467. PermissionDenied = <class 'noc.lib.app.access.PermissionDenied'>
  468. DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
  469. self = <noc.lib.app.site.Site object at 0x80aa9ca90>
  470. v =
  471. <bound method UserApplication.view_changelist of <noc.main.apps.user.views.UserApplication object at 0x80d893090>>
  472. request =
  473. <WSGIRequest
  474. path:/main/user/,
  475. GET:<QueryDict: {}>,
  476. POST:<QueryDict: {u'action': [u'delete_selected'], u'select_across': [u'0'], u'csrfmiddlewaretoken': [u'elY95gtQ9CLdFObPxKU9g4HOpHvCsjvO'], u'_selected_action': [u'3'], u'index': [u'0']}>,
  477. COOKIES:{'csrftoken': 'elY95gtQ9CLdFObPxKU9g4HOpHvCsjvO',
  478. 'sessionid': '1244c50af4246d88f606fb93fc179631'},
  479. META:{'CONTENT_LENGTH': '118',
  480. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  481. 'CSRF_COOKIE': 'elY95gtQ9CLdFObPxKU9g4HOpHvCsjvO',
  482. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
  483. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  484. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU,ru;q=0.8,en-US;q=0.6,en;q=0.4',
  485. 'HTTP_CACHE_CONTROL': 'max-age=0',
  486. 'HTTP_CONNECTION': 'close',
  487. 'HTTP_COOKIE': 'sessionid=1244c50af4246d88f606fb93fc179631; csrftoken=elY95gtQ9CLdFObPxKU9g4HOpHvCsjvO',
  488. 'HTTP_HOST': '10.34.58.156',
  489. 'HTTP_ORIGIN': 'http://10.34.58.156',
  490. 'HTTP_REFERER': 'http://10.34.58.156/main/user/',
  491. 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/42.0.2311.90 Safari/537.36',
  492. 'HTTP_X_SCHEME': 'http',
  493. 'PATH_INFO': u'/main/user/',
  494. 'QUERY_STRING': '',
  495. 'REMOTE_ADDR': '127.0.0.1',
  496. 'REQUEST_METHOD': 'POST',
  497. 'SCRIPT_NAME': u'',
  498. 'SERVER_NAME': '10.34.58.156',
  499. 'SERVER_PORT': '80',
  500. 'SERVER_PROTOCOL': 'HTTP/1.0',
  501. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x80982e9c0>,
  502. 'wsgi.input': <_io.BytesIO object at 0x812520830>,
  503. 'wsgi.multiprocess': True,
  504. 'wsgi.multithread': False,
  505. 'wsgi.run_once': False,
  506. 'wsgi.url_scheme': 'http',
  507. 'wsgi.version': (1, 0)}>
  508. app_logger = <logging.Logger object at 0x80d893110>
  509. InterfaceTypeError = <class 'noc.sa.interfaces.base.InterfaceTypeError'>
  510. to_log_api_call = False
  511. kwargs = {}
  512. nq = <function nq at 0x812608b90>
  513. app = <noc.main.apps.user.views.UserApplication object at 0x80d893090>
  514. ------------------------------------------------------------------------
  515. END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement