Advertisement
Guest User

Untitled

a guest
Jul 16th, 2012
54
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 24.41 KB | None | 0 0
  1. UNHANDLED EXCEPTION (2012-07-16 11:04:10.886065)
  2. Working directory: /opt/noc
  3. <class 'django.core.exceptions.PermissionDenied'>
  4.  
  5. START OF TRACEBACK
  6. ------------------------------------------------------------------------
  7. File: /opt/noc/contrib/lib/django/contrib/admin/actions.py (Line: 29)
  8. Function: delete_selected
  9. 22 Next, it delets all selected objects and redirects back to the change list.
  10. 23 """
  11. 24 opts = modeladmin.model._meta
  12. 25 app_label = opts.app_label
  13. 26
  14. 27 # Check that the user has delete permission for the actual model
  15. 28 if not modeladmin.has_delete_permission(request):
  16. 29 ==> raise PermissionDenied
  17. 30
  18. 31 using = router.db_for_write(modeladmin.model)
  19. 32
  20. 33 # Populate deletable_objects, a data structure of all related objects that
  21. 34 # will also be deleted.
  22. 35 deletable_objects, perms_needed, protected = get_deleted_objects(
  23. Variables:
  24. request = <WSGIRequest
  25. GET:<QueryDict: {}>,
  26. POST:<QueryDict: {u'action': [u'delete_selected'], u'select_across': [u'0'], u'csrfmiddlewaretoken': [u'aa9f950393e4d7e74961b89ff2a3ff8e'], u'_selected_action': [u'4'], u'index': [u'0']}>,
  27. COOKIES:{'csrftoken': 'aa9f950393e4d7e74961b89ff2a3ff8e',
  28. 'sessionid': '1162e783aaa1aed67ca30d246ed111de'},
  29. META:{'CONTENT_LENGTH': '118',
  30. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  31. 'CSRF_COOKIE': 'aa9f950393e4d7e74961b89ff2a3ff8e',
  32. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  33. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  34. 'HTTP_ACCEPT_LANGUAGE': 'ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3',
  35. 'HTTP_CONNECTION': 'Keep-Alive',
  36. 'HTTP_COOKIE': 'csrftoken=aa9f950393e4d7e74961b89ff2a3ff8e; sessionid=1162e783aaa1aed67ca30d246ed111de',
  37. 'HTTP_HOST': 'localhost:8000',
  38. 'HTTP_REFERER': 'http://noc.ab/main/user/',
  39. 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20100101 Firefox/13.0',
  40. 'HTTP_X_FORWARDED_FOR': '10.103.203.31',
  41. 'HTTP_X_FORWARDED_HOST': 'noc.ab',
  42. 'HTTP_X_FORWARDED_SERVER': 'noc.ab',
  43. 'PATH_INFO': u'/main/user/',
  44. 'QUERY_STRING': '',
  45. 'REMOTE_ADDR': '127.0.0.1',
  46. 'REQUEST_METHOD': 'POST',
  47. 'SCRIPT_NAME': u'',
  48. 'SERVER_NAME': 'localhost',
  49. 'SERVER_PORT': '8000',
  50. 'SERVER_PROTOCOL': 'HTTP/1.1',
  51. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x8856810>,
  52. 'wsgi.input': <io.BytesIO object at 0xadc88f0>,
  53. 'wsgi.multiprocess': True,
  54. 'wsgi.multithread': False,
  55. 'wsgi.run_once': False,
  56. 'wsgi.url_scheme': 'http',
  57. 'wsgi.version': (1, 0)}>
  58. queryset = [<User: alina2>]
  59. modeladmin = <noc.main.apps.user.views.UserAdmin object at 0xa5dafd0>
  60. opts = <Options for User>
  61. app_label = 'auth'
  62. ------------------------------------------------------------------------
  63. File: /opt/noc/contrib/lib/django/contrib/admin/options.py (Line: 836)
  64. Function: response_action
  65. 829 self.message_user(request, msg)
  66. 830 return None
  67. 831
  68. 832 if not select_across:
  69. 833 # Perform the action only on the selected objects
  70. 834 queryset = queryset.filter(pk__in=selected)
  71. 835
  72. 836 ==> response = func(self, request, queryset)
  73. 837
  74. 838 # Actions may return an HttpResponse, which will be used as the
  75. 839 # response from the POST. If not, we'll be a good little HTTP
  76. 840 # citizen and redirect back to the changelist page.
  77. 841 if isinstance(response, HttpResponse):
  78. 842 return response
  79. Variables:
  80. action_index = 0
  81. description = <django.utils.functional.__proxy__ object at 0x9192750>
  82. queryset = [<User: alina2>]
  83. self = <noc.main.apps.user.views.UserAdmin object at 0xa5dafd0>
  84. selected = [u'4']
  85. action_form = <django.contrib.admin.helpers.ActionForm object at 0xafba1d0>
  86. request = <WSGIRequest
  87. GET:<QueryDict: {}>,
  88. POST:<QueryDict: {u'action': [u'delete_selected'], u'select_across': [u'0'], u'csrfmiddlewaretoken': [u'aa9f950393e4d7e74961b89ff2a3ff8e'], u'_selected_action': [u'4'], u'index': [u'0']}>,
  89. COOKIES:{'csrftoken': 'aa9f950393e4d7e74961b89ff2a3ff8e',
  90. 'sessionid': '1162e783aaa1aed67ca30d246ed111de'},
  91. META:{'CONTENT_LENGTH': '118',
  92. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  93. 'CSRF_COOKIE': 'aa9f950393e4d7e74961b89ff2a3ff8e',
  94. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  95. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  96. 'HTTP_ACCEPT_LANGUAGE': 'ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3',
  97. 'HTTP_CONNECTION': 'Keep-Alive',
  98. 'HTTP_COOKIE': 'csrftoken=aa9f950393e4d7e74961b89ff2a3ff8e; sessionid=1162e783aaa1aed67ca30d246ed111de',
  99. 'HTTP_HOST': 'localhost:8000',
  100. 'HTTP_REFERER': 'http://noc.ab/main/user/',
  101. 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20100101 Firefox/13.0',
  102. 'HTTP_X_FORWARDED_FOR': '10.103.203.31',
  103. 'HTTP_X_FORWARDED_HOST': 'noc.ab',
  104. 'HTTP_X_FORWARDED_SERVER': 'noc.ab',
  105. 'PATH_INFO': u'/main/user/',
  106. 'QUERY_STRING': '',
  107. 'REMOTE_ADDR': '127.0.0.1',
  108. 'REQUEST_METHOD': 'POST',
  109. 'SCRIPT_NAME': u'',
  110. 'SERVER_NAME': 'localhost',
  111. 'SERVER_PORT': '8000',
  112. 'SERVER_PROTOCOL': 'HTTP/1.1',
  113. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x8856810>,
  114. 'wsgi.input': <io.BytesIO object at 0xadc88f0>,
  115. 'wsgi.multiprocess': True,
  116. 'wsgi.multithread': False,
  117. 'wsgi.run_once': False,
  118. 'wsgi.url_scheme': 'http',
  119. 'wsgi.version': (1, 0)}>
  120. select_across = False
  121. func = <function delete_selected at 0x9194ed8>
  122. action = u'delete_selected'
  123. data = <QueryDict: {u'action': [u'delete_selected', u'delete_selected'], u'select_across': [u'0'], u'csrfmiddlewaretoken': [u'aa9f950393e4d7e74961b89ff2a3ff8e']}>
  124. name = 'delete_selected'
  125. ------------------------------------------------------------------------
  126. File: /opt/noc/contrib/lib/django/contrib/admin/options.py (Line: 1079)
  127. Function: changelist_view
  128. 1072 action_failed = False
  129. 1073 selected = request.POST.getlist(helpers.ACTION_CHECKBOX_NAME)
  130. 1074
  131. 1075 # Actions with no confirmation
  132. 1076 if (actions and request.method == 'POST' and
  133. 1077 'index' in request.POST and '_save' not in request.POST):
  134. 1078 if selected:
  135. 1079 ==> response = self.response_action(request, queryset=cl.get_query_set())
  136. 1080 if response:
  137. 1081 return response
  138. 1082 else:
  139. 1083 action_failed = True
  140. 1084 else:
  141. 1085 msg = _("Items must be selected in order to perform "
  142. Variables:
  143. list_display = ['action_checkbox', 'username', 'email', 'first_name', 'last_name', 'is_active', 'is_superuser']
  144. cl = <django.contrib.admin.views.main.ChangeList object at 0xb032690>
  145. ChangeList = <class 'django.contrib.admin.views.main.ChangeList'>
  146. selected = [u'4']
  147. request = <WSGIRequest
  148. GET:<QueryDict: {}>,
  149. POST:<QueryDict: {u'action': [u'delete_selected'], u'select_across': [u'0'], u'csrfmiddlewaretoken': [u'aa9f950393e4d7e74961b89ff2a3ff8e'], u'_selected_action': [u'4'], u'index': [u'0']}>,
  150. COOKIES:{'csrftoken': 'aa9f950393e4d7e74961b89ff2a3ff8e',
  151. 'sessionid': '1162e783aaa1aed67ca30d246ed111de'},
  152. META:{'CONTENT_LENGTH': '118',
  153. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  154. 'CSRF_COOKIE': 'aa9f950393e4d7e74961b89ff2a3ff8e',
  155. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  156. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  157. 'HTTP_ACCEPT_LANGUAGE': 'ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3',
  158. 'HTTP_CONNECTION': 'Keep-Alive',
  159. 'HTTP_COOKIE': 'csrftoken=aa9f950393e4d7e74961b89ff2a3ff8e; sessionid=1162e783aaa1aed67ca30d246ed111de',
  160. 'HTTP_HOST': 'localhost:8000',
  161. 'HTTP_REFERER': 'http://noc.ab/main/user/',
  162. 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20100101 Firefox/13.0',
  163. 'HTTP_X_FORWARDED_FOR': '10.103.203.31',
  164. 'HTTP_X_FORWARDED_HOST': 'noc.ab',
  165. 'HTTP_X_FORWARDED_SERVER': 'noc.ab',
  166. 'PATH_INFO': u'/main/user/',
  167. 'QUERY_STRING': '',
  168. 'REMOTE_ADDR': '127.0.0.1',
  169. 'REQUEST_METHOD': 'POST',
  170. 'SCRIPT_NAME': u'',
  171. 'SERVER_NAME': 'localhost',
  172. 'SERVER_PORT': '8000',
  173. 'SERVER_PROTOCOL': 'HTTP/1.1',
  174. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x8856810>,
  175. 'wsgi.input': <io.BytesIO object at 0xadc88f0>,
  176. 'wsgi.multiprocess': True,
  177. 'wsgi.multithread': False,
  178. 'wsgi.run_once': False,
  179. 'wsgi.url_scheme': 'http',
  180. 'wsgi.version': (1, 0)}>
  181. actions = {'export_selected_csv': (<function admin_csv_export at 0xa6358c0>, 'export_selected_csv', 'Export selected %(verbose_name_plural)s to CSV'), 'delete_selected': (<function delete_selected at 0x9194ed8>, 'delete_selected', <django.utils.functional.__proxy__ object at 0x9192750>)}
  182. self = <noc.main.apps.user.views.UserAdmin object at 0xa5dafd0>
  183. action_failed = False
  184. app_label = 'auth'
  185. extra_context = {'app': <noc.main.apps.user.views.UserApplication object at 0xa5daf50>}
  186. ERROR_FLAG = 'e'
  187. opts = <Options for User>
  188. ------------------------------------------------------------------------
  189. File: /opt/noc/contrib/lib/django/utils/decorators.py (Line: 24)
  190. Function: bound_func
  191. 17 """
  192. 18 # 'func' is a function at the time it is passed to _dec, but will eventually
  193. 19 # be a method of the class it is defined it.
  194. 20 def _dec(func):
  195. 21 def _wrapper(self, *args, **kwargs):
  196. 22 @decorator
  197. 23 def bound_func(*args2, **kwargs2):
  198. 24 ==> return func(self, *args2, **kwargs2)
  199. 25 # bound_func has the signature that 'decorator' expects i.e. no
  200. 26 # 'self' argument, but it is a closure over self so it can call
  201. 27 # 'func' correctly.
  202. 28 return bound_func(*args, **kwargs)
  203. 29 # In case 'decorator' adds attributes to the function it decorates, we
  204. 30 # want to copy those. We don't have access to bound_func in this scope,
  205. Variables:
  206. args2 = (<WSGIRequest
  207. GET:<QueryDict: {}>,
  208. POST:<QueryDict: {u'action': [u'delete_selected'], u'select_across': [u'0'], u'csrfmiddlewaretoken': [u'aa9f950393e4d7e74961b89ff2a3ff8e'], u'_selected_action': [u'4'], u'index': [u'0']}>,
  209. COOKIES:{'csrftoken': 'aa9f950393e4d7e74961b89ff2a3ff8e',
  210. 'sessionid': '1162e783aaa1aed67ca30d246ed111de'},
  211. META:{'CONTENT_LENGTH': '118',
  212. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  213. 'CSRF_COOKIE': 'aa9f950393e4d7e74961b89ff2a3ff8e',
  214. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  215. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  216. 'HTTP_ACCEPT_LANGUAGE': 'ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3',
  217. 'HTTP_CONNECTION': 'Keep-Alive',
  218. 'HTTP_COOKIE': 'csrftoken=aa9f950393e4d7e74961b89ff2a3ff8e; sessionid=1162e783aaa1aed67ca30d246ed111de',
  219. 'HTTP_HOST': 'localhost:8000',
  220. 'HTTP_REFERER': 'http://noc.ab/main/user/',
  221. 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20100101 Firefox/13.0',
  222. 'HTTP_X_FORWARDED_FOR': '10.103.203.31',
  223. 'HTTP_X_FORWARDED_HOST': 'noc.ab',
  224. 'HTTP_X_FORWARDED_SERVER': 'noc.ab',
  225. 'PATH_INFO': u'/main/user/',
  226. 'QUERY_STRING': '',
  227. 'REMOTE_ADDR': '127.0.0.1',
  228. 'REQUEST_METHOD': 'POST',
  229. 'SCRIPT_NAME': u'',
  230. 'SERVER_NAME': 'localhost',
  231. 'SERVER_PORT': '8000',
  232. 'SERVER_PROTOCOL': 'HTTP/1.1',
  233. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x8856810>,
  234. 'wsgi.input': <io.BytesIO object at 0xadc88f0>,
  235. 'wsgi.multiprocess': True,
  236. 'wsgi.multithread': False,
  237. 'wsgi.run_once': False,
  238. 'wsgi.url_scheme': 'http',
  239. 'wsgi.version': (1, 0)}>, {'app': <noc.main.apps.user.views.UserApplication object at 0xa5daf50>})
  240. func = <function changelist_view at 0x9193c80>
  241. self = <noc.main.apps.user.views.UserAdmin object at 0xa5dafd0>
  242. kwargs2 = {}
  243. ------------------------------------------------------------------------
  244. File: /opt/noc/contrib/lib/django/utils/decorators.py (Line: 93)
  245. Function: _wrapped_view
  246. 86 if result is not None:
  247. 87 return result
  248. 88 if hasattr(middleware, 'process_view'):
  249. 89 result = middleware.process_view(request, view_func, args, kwargs)
  250. 90 if result is not None:
  251. 91 return result
  252. 92 try:
  253. 93 ==> response = view_func(request, *args, **kwargs)
  254. 94 except Exception, e:
  255. 95 if hasattr(middleware, 'process_exception'):
  256. 96 result = middleware.process_exception(request, e)
  257. 97 if result is not None:
  258. 98 return result
  259. 99 raise
  260. Variables:
  261. e = PermissionDenied()
  262. middleware = <django.middleware.csrf.CsrfViewMiddleware object at 0x9156210>
  263. args = ({'app': <noc.main.apps.user.views.UserApplication object at 0xa5daf50>},)
  264. request = <WSGIRequest
  265. GET:<QueryDict: {}>,
  266. POST:<QueryDict: {u'action': [u'delete_selected'], u'select_across': [u'0'], u'csrfmiddlewaretoken': [u'aa9f950393e4d7e74961b89ff2a3ff8e'], u'_selected_action': [u'4'], u'index': [u'0']}>,
  267. COOKIES:{'csrftoken': 'aa9f950393e4d7e74961b89ff2a3ff8e',
  268. 'sessionid': '1162e783aaa1aed67ca30d246ed111de'},
  269. META:{'CONTENT_LENGTH': '118',
  270. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  271. 'CSRF_COOKIE': 'aa9f950393e4d7e74961b89ff2a3ff8e',
  272. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  273. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  274. 'HTTP_ACCEPT_LANGUAGE': 'ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3',
  275. 'HTTP_CONNECTION': 'Keep-Alive',
  276. 'HTTP_COOKIE': 'csrftoken=aa9f950393e4d7e74961b89ff2a3ff8e; sessionid=1162e783aaa1aed67ca30d246ed111de',
  277. 'HTTP_HOST': 'localhost:8000',
  278. 'HTTP_REFERER': 'http://noc.ab/main/user/',
  279. 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20100101 Firefox/13.0',
  280. 'HTTP_X_FORWARDED_FOR': '10.103.203.31',
  281. 'HTTP_X_FORWARDED_HOST': 'noc.ab',
  282. 'HTTP_X_FORWARDED_SERVER': 'noc.ab',
  283. 'PATH_INFO': u'/main/user/',
  284. 'QUERY_STRING': '',
  285. 'REMOTE_ADDR': '127.0.0.1',
  286. 'REQUEST_METHOD': 'POST',
  287. 'SCRIPT_NAME': u'',
  288. 'SERVER_NAME': 'localhost',
  289. 'SERVER_PORT': '8000',
  290. 'SERVER_PROTOCOL': 'HTTP/1.1',
  291. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x8856810>,
  292. 'wsgi.input': <io.BytesIO object at 0xadc88f0>,
  293. 'wsgi.multiprocess': True,
  294. 'wsgi.multithread': False,
  295. 'wsgi.run_once': False,
  296. 'wsgi.url_scheme': 'http',
  297. 'wsgi.version': (1, 0)}>
  298. result = None
  299. kwargs = {}
  300. view_func = <function bound_func at 0xaf27848>
  301. ------------------------------------------------------------------------
  302. File: /opt/noc/contrib/lib/django/utils/decorators.py (Line: 28)
  303. Function: _wrapper
  304. 21 def _wrapper(self, *args, **kwargs):
  305. 22 @decorator
  306. 23 def bound_func(*args2, **kwargs2):
  307. 24 return func(self, *args2, **kwargs2)
  308. 25 # bound_func has the signature that 'decorator' expects i.e. no
  309. 26 # 'self' argument, but it is a closure over self so it can call
  310. 27 # 'func' correctly.
  311. 28 ==> return bound_func(*args, **kwargs)
  312. 29 # In case 'decorator' adds attributes to the function it decorates, we
  313. 30 # want to copy those. We don't have access to bound_func in this scope,
  314. 31 # but we can cheat by using it on a dummy function.
  315. 32 @decorator
  316. 33 def dummy(*args, **kwargs):
  317. 34 pass
  318. Variables:
  319. self = <noc.main.apps.user.views.UserAdmin object at 0xa5dafd0>
  320. args = (<WSGIRequest
  321. GET:<QueryDict: {}>,
  322. POST:<QueryDict: {u'action': [u'delete_selected'], u'select_across': [u'0'], u'csrfmiddlewaretoken': [u'aa9f950393e4d7e74961b89ff2a3ff8e'], u'_selected_action': [u'4'], u'index': [u'0']}>,
  323. COOKIES:{'csrftoken': 'aa9f950393e4d7e74961b89ff2a3ff8e',
  324. 'sessionid': '1162e783aaa1aed67ca30d246ed111de'},
  325. META:{'CONTENT_LENGTH': '118',
  326. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  327. 'CSRF_COOKIE': 'aa9f950393e4d7e74961b89ff2a3ff8e',
  328. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  329. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  330. 'HTTP_ACCEPT_LANGUAGE': 'ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3',
  331. 'HTTP_CONNECTION': 'Keep-Alive',
  332. 'HTTP_COOKIE': 'csrftoken=aa9f950393e4d7e74961b89ff2a3ff8e; sessionid=1162e783aaa1aed67ca30d246ed111de',
  333. 'HTTP_HOST': 'localhost:8000',
  334. 'HTTP_REFERER': 'http://noc.ab/main/user/',
  335. 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20100101 Firefox/13.0',
  336. 'HTTP_X_FORWARDED_FOR': '10.103.203.31',
  337. 'HTTP_X_FORWARDED_HOST': 'noc.ab',
  338. 'HTTP_X_FORWARDED_SERVER': 'noc.ab',
  339. 'PATH_INFO': u'/main/user/',
  340. 'QUERY_STRING': '',
  341. 'REMOTE_ADDR': '127.0.0.1',
  342. 'REQUEST_METHOD': 'POST',
  343. 'SCRIPT_NAME': u'',
  344. 'SERVER_NAME': 'localhost',
  345. 'SERVER_PORT': '8000',
  346. 'SERVER_PROTOCOL': 'HTTP/1.1',
  347. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x8856810>,
  348. 'wsgi.input': <io.BytesIO object at 0xadc88f0>,
  349. 'wsgi.multiprocess': True,
  350. 'wsgi.multithread': False,
  351. 'wsgi.run_once': False,
  352. 'wsgi.url_scheme': 'http',
  353. 'wsgi.version': (1, 0)}>, {'app': <noc.main.apps.user.views.UserApplication object at 0xa5daf50>})
  354. bound_func = <function bound_func at 0xaf276e0>
  355. func = <function changelist_view at 0x9193c80>
  356. kwargs = {}
  357. decorator = <function csrf_protect at 0x9157320>
  358. ------------------------------------------------------------------------
  359. File: /opt/noc/lib/app/modelapplication.py (Line: 141)
  360. Function: view_changelist
  361. 134 self.model._meta.object_name.lower())
  362. 135
  363. 136 @view(url=r"^$", url_name="changelist", access=HasPerm("change"),
  364. 137 menu=get_menu)
  365. 138 def view_changelist(self, request, extra_context=None):
  366. 139 """Display changelist"""
  367. 140 return self.admin.changelist_view(request,
  368. 141 ==> self.get_context(extra_context))
  369. 142
  370. 143 @view(url=r"^add/$", url_name="add", access=HasPerm("add"))
  371. 144 def view_add(self, request, form_url="", extra_context=None):
  372. 145 """Display add form"""
  373. 146 return self.admin.add_view(request,
  374. 147 extra_context=self.get_context(extra_context))
  375. Variables:
  376. self = <noc.main.apps.user.views.UserApplication object at 0xa5daf50>
  377. extra_context = None
  378. request = <WSGIRequest
  379. GET:<QueryDict: {}>,
  380. POST:<QueryDict: {u'action': [u'delete_selected'], u'select_across': [u'0'], u'csrfmiddlewaretoken': [u'aa9f950393e4d7e74961b89ff2a3ff8e'], u'_selected_action': [u'4'], u'index': [u'0']}>,
  381. COOKIES:{'csrftoken': 'aa9f950393e4d7e74961b89ff2a3ff8e',
  382. 'sessionid': '1162e783aaa1aed67ca30d246ed111de'},
  383. META:{'CONTENT_LENGTH': '118',
  384. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  385. 'CSRF_COOKIE': 'aa9f950393e4d7e74961b89ff2a3ff8e',
  386. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  387. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  388. 'HTTP_ACCEPT_LANGUAGE': 'ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3',
  389. 'HTTP_CONNECTION': 'Keep-Alive',
  390. 'HTTP_COOKIE': 'csrftoken=aa9f950393e4d7e74961b89ff2a3ff8e; sessionid=1162e783aaa1aed67ca30d246ed111de',
  391. 'HTTP_HOST': 'localhost:8000',
  392. 'HTTP_REFERER': 'http://noc.ab/main/user/',
  393. 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20100101 Firefox/13.0',
  394. 'HTTP_X_FORWARDED_FOR': '10.103.203.31',
  395. 'HTTP_X_FORWARDED_HOST': 'noc.ab',
  396. 'HTTP_X_FORWARDED_SERVER': 'noc.ab',
  397. 'PATH_INFO': u'/main/user/',
  398. 'QUERY_STRING': '',
  399. 'REMOTE_ADDR': '127.0.0.1',
  400. 'REQUEST_METHOD': 'POST',
  401. 'SCRIPT_NAME': u'',
  402. 'SERVER_NAME': 'localhost',
  403. 'SERVER_PORT': '8000',
  404. 'SERVER_PROTOCOL': 'HTTP/1.1',
  405. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x8856810>,
  406. 'wsgi.input': <io.BytesIO object at 0xadc88f0>,
  407. 'wsgi.multiprocess': True,
  408. 'wsgi.multithread': False,
  409. 'wsgi.run_once': False,
  410. 'wsgi.url_scheme': 'http',
  411. 'wsgi.version': (1, 0)}>
  412. ------------------------------------------------------------------------
  413. File: /opt/noc/lib/app/site.py (Line: 224)
  414. Function: inner
  415. 217 for k, v in request.POST.lists())
  416. 218 elif request.method == "GET":
  417. 219 a = dict((k, v[0] if len(v) == 1 else v)
  418. 220 for k, v in request.GET.lists())
  419. 221 logging.debug("API %s %s %s" % (request.method,
  420. 222 request.path, a))
  421. 223 # Call handler
  422. 224 ==> r = v(request, *args, **kwargs)
  423. 225 # Dump SQL statements
  424. 226 if self.log_sql_statements:
  425. 227 from django.db import connections
  426. 228 for conn in connections.all():
  427. 229 for q in conn.queries:
  428. 230 logging.debug("SQL %(sql)s %(time)ss" % q)
  429. Variables:
  430. args = ()
  431. view_map = {'PUT': <bound method UserApplication.view_changelist of <noc.main.apps.user.views.UserApplication object at 0xa5daf50>>, 'POST': <bound method UserApplication.view_changelist of <noc.main.apps.user.views.UserApplication object at 0xa5daf50>>, 'GET': <bound method UserApplication.view_changelist of <noc.main.apps.user.views.UserApplication object at 0xa5daf50>>, 'DELETE': <bound method UserApplication.view_changelist of <noc.main.apps.user.views.UserApplication object at 0xa5daf50>>}
  432. Form = <class 'django.forms.forms.Form'>
  433. DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
  434. self = <noc.lib.app.site.Site object at 0x8f58390>
  435. v = <bound method UserApplication.view_changelist of <noc.main.apps.user.views.UserApplication object at 0xa5daf50>>
  436. request = <WSGIRequest
  437. GET:<QueryDict: {}>,
  438. POST:<QueryDict: {u'action': [u'delete_selected'], u'select_across': [u'0'], u'csrfmiddlewaretoken': [u'aa9f950393e4d7e74961b89ff2a3ff8e'], u'_selected_action': [u'4'], u'index': [u'0']}>,
  439. COOKIES:{'csrftoken': 'aa9f950393e4d7e74961b89ff2a3ff8e',
  440. 'sessionid': '1162e783aaa1aed67ca30d246ed111de'},
  441. META:{'CONTENT_LENGTH': '118',
  442. 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
  443. 'CSRF_COOKIE': 'aa9f950393e4d7e74961b89ff2a3ff8e',
  444. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  445. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  446. 'HTTP_ACCEPT_LANGUAGE': 'ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3',
  447. 'HTTP_CONNECTION': 'Keep-Alive',
  448. 'HTTP_COOKIE': 'csrftoken=aa9f950393e4d7e74961b89ff2a3ff8e; sessionid=1162e783aaa1aed67ca30d246ed111de',
  449. 'HTTP_HOST': 'localhost:8000',
  450. 'HTTP_REFERER': 'http://noc.ab/main/user/',
  451. 'HTTP_USER_AGENT': 'Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/20100101 Firefox/13.0',
  452. 'HTTP_X_FORWARDED_FOR': '10.103.203.31',
  453. 'HTTP_X_FORWARDED_HOST': 'noc.ab',
  454. 'HTTP_X_FORWARDED_SERVER': 'noc.ab',
  455. 'PATH_INFO': u'/main/user/',
  456. 'QUERY_STRING': '',
  457. 'REMOTE_ADDR': '127.0.0.1',
  458. 'REQUEST_METHOD': 'POST',
  459. 'SCRIPT_NAME': u'',
  460. 'SERVER_NAME': 'localhost',
  461. 'SERVER_PORT': '8000',
  462. 'SERVER_PROTOCOL': 'HTTP/1.1',
  463. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x8856810>,
  464. 'wsgi.input': <io.BytesIO object at 0xadc88f0>,
  465. 'wsgi.multiprocess': True,
  466. 'wsgi.multithread': False,
  467. 'wsgi.run_once': False,
  468. 'wsgi.url_scheme': 'http',
  469. 'wsgi.version': (1, 0)}>
  470. to_log_api_call = False
  471. InterfaceTypeError = <class 'noc.sa.interfaces.base.InterfaceTypeError'>
  472. PermissionDenied = <class 'noc.lib.app.access.PermissionDenied'>
  473. kwargs = {}
  474. app = <noc.main.apps.user.views.UserApplication object at 0xa5daf50>
  475. ------------------------------------------------------------------------
  476. END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement