Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UNHANDLED EXCEPTION (2012-04-16 14:07:12.815462)
- Working directory: /usr/local/noc
- <class 'django.db.utils.IntegrityError'>
- <ManagedObject: 2960-KIT-LC-Office> object is referenced from <class 'noc.inv.models.Interface'>
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: /usr/local/noc/lib/nosql.py (Line: 145)
- Function: on_ref_delete
- 138 :return:
- 139 """
- 140 if not self.name:
- 141 return
- 142 doc = self.owner_document
- 143 if doc.objects.filter(**{self.name: instance.id}).first() is not None:
- 144 raise IntegrityError("%r object is referenced from %r" % (instance,
- 145 ==> doc))
- 146
- 147 def __get__(self, instance, owner):
- 148 """Descriptor to allow lazy dereferencing."""
- 149 if instance is None:
- 150 # Document class being used rather than a document object
- 151 return self
- Variables:
- doc = <class 'noc.inv.models.Interface'>
- self = <noc.lib.nosql.ForeignKeyField object at 0x2a4f92cc>
- instance = <ManagedObject: 2960-KIT-LC-Office>
- sender = <class 'noc.sa.models.ManagedObject'>
- kwargs = {'using': 'default', 'signal': <django.dispatch.dispatcher.Signal object at 0x298e790c>}
- ------------------------------------------------------------------------
- File: /usr/local/noc/contrib/lib/django/dispatch/dispatcher.py (Line: 172)
- Function: send
- 165 Returns a list of tuple pairs [(receiver, response), ... ].
- 166 """
- 167 responses = []
- 168 if not self.receivers:
- 169 return responses
- 170
- 171 for receiver in self._live_receivers(_make_id(sender)):
- 172 ==> response = receiver(signal=self, sender=sender, **named)
- 173 responses.append((receiver, response))
- 174 return responses
- 175
- 176 def send_robust(self, sender, **named):
- 177 """
- 178 Send signal from sender to all connected receivers catching errors.
- Variables:
- named = {'instance': <ManagedObject: 2960-KIT-LC-Office>, 'using': 'default'}
- responses = [(<function audit_trail_delete at 0x2a0b3e64>, None), (<bound method ?.on_ref_delete of <noc.lib.nosql.ForeignKeyField object at 0x2a4f914c>>, None)]
- self = <django.dispatch.dispatcher.Signal object at 0x298e790c>
- receiver = <bound method ?.on_ref_delete of <noc.lib.nosql.ForeignKeyField object at 0x2a4f92cc>>
- response = None
- sender = <class 'noc.sa.models.ManagedObject'>
- ------------------------------------------------------------------------
- File: /usr/local/noc/contrib/lib/django/db/models/deletion.py (Line: 230)
- Function: delete
- 223 # end of a transaction.
- 224 self.sort()
- 225
- 226 # send pre_delete signals
- 227 for model, obj in self.instances_with_model():
- 228 if not model._meta.auto_created:
- 229 signals.pre_delete.send(
- 230 ==> sender=model, instance=obj, using=self.using
- 231 )
- 232
- 233 # update fields
- 234 for model, instances_for_fieldvalues in self.field_updates.iteritems():
- 235 query = sql.UpdateQuery(model)
- 236 for (field, value), instances in instances_for_fieldvalues.iteritems():
- Variables:
- instances = set([<Config: config/2960-KIT-LC-Office-config>])
- model = <class 'noc.sa.models.ManagedObject'>
- obj = <ManagedObject: 2960-KIT-LC-Office>
- self = <django.db.models.deletion.Collector object at 0x2b0a2bcc>
- ------------------------------------------------------------------------
- File: /usr/local/noc/contrib/lib/django/db/models/deletion.py (Line: 63)
- Function: decorated
- 56 def decorated(self, *args, **kwargs):
- 57 if not transaction.is_managed(using=self.using):
- 58 transaction.enter_transaction_management(using=self.using)
- 59 forced_managed = True
- 60 else:
- 61 forced_managed = False
- 62 try:
- 63 ==> func(self, *args, **kwargs)
- 64 if forced_managed:
- 65 transaction.commit(using=self.using)
- 66 else:
- 67 transaction.commit_unless_managed(using=self.using)
- 68 finally:
- 69 if forced_managed:
- Variables:
- self = <django.db.models.deletion.Collector object at 0x2b0a2bcc>
- kwargs = {}
- func = <function delete at 0x29870aac>
- args = ()
- forced_managed = False
- ------------------------------------------------------------------------
- File: /usr/local/noc/contrib/lib/django/db/models/query.py (Line: 445)
- Function: delete
- 438
- 439 # Disable non-supported fields.
- 440 del_query.query.select_related = False
- 441 del_query.query.clear_ordering()
- 442
- 443 collector = Collector(using=del_query.db)
- 444 collector.collect(del_query)
- 445 ==> collector.delete()
- 446
- 447 # Clear the result cache, in case this QuerySet gets reused.
- 448 self._result_cache = None
- 449 delete.alters_data = True
- 450
- 451 def update(self, **kwargs):
- Variables:
- self = [<ManagedObject: 2960-KIT-LC-Office>]
- collector = <django.db.models.deletion.Collector object at 0x2b0a2bcc>
- del_query = [<ManagedObject: 2960-KIT-LC-Office>]
- ------------------------------------------------------------------------
- File: /usr/local/noc/contrib/lib/django/contrib/admin/actions.py (Line: 48)
- Function: delete_selected
- 41 if perms_needed:
- 42 raise PermissionDenied
- 43 n = queryset.count()
- 44 if n:
- 45 for obj in queryset:
- 46 obj_display = force_unicode(obj)
- 47 modeladmin.log_deletion(request, obj, obj_display)
- 48 ==> queryset.delete()
- 49 modeladmin.message_user(request, _("Successfully deleted %(count)d %(items)s.") % {
- 50 "count": n, "items": model_ngettext(modeladmin.opts, n)
- 51 })
- 52 # Return None to display the change list page again.
- 53 return None
- 54
- Variables:
- obj_display = u'2960-KIT-LC-Office'
- obj = <ManagedObject: 2960-KIT-LC-Office>
- queryset = [<ManagedObject: 2960-KIT-LC-Office>]
- deletable_objects = [u'\u041e\u0431\u044a\u0435\u043a\u0442: 2960-KIT-LC-Office', [u'Map/Reduce Task Data: 285: 2960-KIT-LC-Office Cisco.IOS.has_vlan', u'Map/Reduce Task Data: 256: 2960-KIT-LC-Office Cisco.IOS.has_vlan', u'Map/Reduce Task Data: 314: 2960-KIT-LC-Office Cisco.IOS.has_vlan', u'Config: config/2960-KIT-LC-Office-config']]
- request = <WSGIRequest
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'action': [u'delete_selected'], u'_selected_action': [u'2'], u'csrfmiddlewaretoken': [u'be8b13c68edc98f74583ad21ed92a08e'], u'post': [u'yes']}>,
- COOKIES:{'csrftoken': 'be8b13c68edc98f74583ad21ed92a08e',
- 'sessionid': '899932577f4c961b279b7975c3f3c51f'},
- META:{'CONTENT_LENGTH': '103',
- 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
- 'CSRF_COOKIE': 'be8b13c68edc98f74583ad21ed92a08e',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'sessionid=899932577f4c961b279b7975c3f3c51f; csrftoken=be8b13c68edc98f74583ad21ed92a08e',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_REFERER': 'http://192.168.10.152/sa/managedobject/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20100101 Firefox/11.0',
- 'PATH_INFO': u'/sa/managedobject/',
- 'QUERY_STRING': '',
- 'REMOTE_ADDR': '127.0.0.1',
- 'REQUEST_METHOD': 'POST',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': '127.0.0.1',
- 'SERVER_PORT': '8000',
- 'SERVER_PROTOCOL': 'HTTP/1.0',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x29227128>,
- 'wsgi.input': <_io.BytesIO object at 0x2afcd23c>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- n = 1
- perms_needed = set([])
- modeladmin = <noc.sa.apps.managedobject.views.ManagedObjectAdmin object at 0x2a9e1f6c>
- app_label = 'sa'
- using = 'default'
- protected = []
- opts = <Options for ManagedObject>
- ------------------------------------------------------------------------
- File: /usr/local/noc/contrib/lib/django/contrib/admin/options.py (Line: 836)
- Function: response_action
- 829 self.message_user(request, msg)
- 830 return None
- 831
- 832 if not select_across:
- 833 # Perform the action only on the selected objects
- 834 queryset = queryset.filter(pk__in=selected)
- 835
- 836 ==> response = func(self, request, queryset)
- 837
- 838 # Actions may return an HttpResponse, which will be used as the
- 839 # response from the POST. If not, we'll be a good little HTTP
- 840 # citizen and redirect back to the changelist page.
- 841 if isinstance(response, HttpResponse):
- 842 return response
- Variables:
- action_index = 0
- description = <django.utils.functional.__proxy__ object at 0x2a018dac>
- queryset = [<ManagedObject: 2960-KIT-LC-Office>]
- self = <noc.sa.apps.managedobject.views.ManagedObjectAdmin object at 0x2a9e1f6c>
- selected = [u'2']
- action_form = <django.contrib.admin.helpers.ActionForm object at 0x2afe1f2c>
- request = <WSGIRequest
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'action': [u'delete_selected'], u'_selected_action': [u'2'], u'csrfmiddlewaretoken': [u'be8b13c68edc98f74583ad21ed92a08e'], u'post': [u'yes']}>,
- COOKIES:{'csrftoken': 'be8b13c68edc98f74583ad21ed92a08e',
- 'sessionid': '899932577f4c961b279b7975c3f3c51f'},
- META:{'CONTENT_LENGTH': '103',
- 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
- 'CSRF_COOKIE': 'be8b13c68edc98f74583ad21ed92a08e',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'sessionid=899932577f4c961b279b7975c3f3c51f; csrftoken=be8b13c68edc98f74583ad21ed92a08e',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_REFERER': 'http://192.168.10.152/sa/managedobject/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20100101 Firefox/11.0',
- 'PATH_INFO': u'/sa/managedobject/',
- 'QUERY_STRING': '',
- 'REMOTE_ADDR': '127.0.0.1',
- 'REQUEST_METHOD': 'POST',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': '127.0.0.1',
- 'SERVER_PORT': '8000',
- 'SERVER_PROTOCOL': 'HTTP/1.0',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x29227128>,
- 'wsgi.input': <_io.BytesIO object at 0x2afcd23c>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- select_across = False
- func = <function delete_selected at 0x2a01a87c>
- action = u'delete_selected'
- data = <QueryDict: {u'action': [u'delete_selected', u'delete_selected'], u'csrfmiddlewaretoken': [u'be8b13c68edc98f74583ad21ed92a08e'], u'post': [u'yes']}>
- name = 'delete_selected'
- ------------------------------------------------------------------------
- File: /usr/local/noc/contrib/lib/django/contrib/admin/options.py (Line: 1095)
- Function: changelist_view
- 1088 action_failed = True
- 1089
- 1090 # Actions with confirmation
- 1091 if (actions and request.method == 'POST' and
- 1092 helpers.ACTION_CHECKBOX_NAME in request.POST and
- 1093 'index' not in request.POST and '_save' not in request.POST):
- 1094 if selected:
- 1095 ==> response = self.response_action(request, queryset=cl.get_query_set())
- 1096 if response:
- 1097 return response
- 1098 else:
- 1099 action_failed = True
- 1100
- 1101 # If we're allowing changelist editing, we need to construct a formset
- Variables:
- list_display = ['action_checkbox', 'name', <function object_status at 0x2a9da684>, <function alarms at 0x2a9da6bc>, <function profile at 0x2a9da614>, 'vrf', 'address', <function domain_activator at 0x2a9da6f4>, 'description', 'repo_path', <function action_links at 0x2a9d5b1c>, <bound method ManagedObjectApplication.display_tags of <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x2a9e1eac>>]
- cl = <django.contrib.admin.views.main.ChangeList object at 0x2afc8c6c>
- ChangeList = <class 'django.contrib.admin.views.main.ChangeList'>
- selected = [u'2']
- request = <WSGIRequest
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'action': [u'delete_selected'], u'_selected_action': [u'2'], u'csrfmiddlewaretoken': [u'be8b13c68edc98f74583ad21ed92a08e'], u'post': [u'yes']}>,
- COOKIES:{'csrftoken': 'be8b13c68edc98f74583ad21ed92a08e',
- 'sessionid': '899932577f4c961b279b7975c3f3c51f'},
- META:{'CONTENT_LENGTH': '103',
- 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
- 'CSRF_COOKIE': 'be8b13c68edc98f74583ad21ed92a08e',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'sessionid=899932577f4c961b279b7975c3f3c51f; csrftoken=be8b13c68edc98f74583ad21ed92a08e',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_REFERER': 'http://192.168.10.152/sa/managedobject/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20100101 Firefox/11.0',
- 'PATH_INFO': u'/sa/managedobject/',
- 'QUERY_STRING': '',
- 'REMOTE_ADDR': '127.0.0.1',
- 'REQUEST_METHOD': 'POST',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': '127.0.0.1',
- 'SERVER_PORT': '8000',
- 'SERVER_PROTOCOL': 'HTTP/1.0',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x29227128>,
- 'wsgi.input': <_io.BytesIO object at 0x2afcd23c>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- actions = {'bulk_change_activator': (<unbound method ManagedObjectAdmin.bulk_change_activator>, 'bulk_change_activator', u'Change activator for selected objects'), 'export_selected_csv': (<function admin_csv_export at 0x2a7e41b4>, 'export_selected_csv', 'Export selected %(verbose_name_plural)s to CSV'), 'reschedule_discovery': (<unbound method ManagedObjectAdmin.reschedule_discovery>, 'reschedule_discovery', u'Run interface discovery now'), 'test_access': (<unbound method ManagedObjectAdmin.test_access>, 'test_access', u'Test selected object access'), 'delete_selected': (<function delete_selected at 0x2a01a87c>, 'delete_selected', <django.utils.functional.__proxy__ object at 0x2a018dac>)}
- self = <noc.sa.apps.managedobject.views.ManagedObjectAdmin object at 0x2a9e1f6c>
- action_failed = False
- app_label = 'sa'
- extra_context = {'app': <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x2a9e1eac>}
- ERROR_FLAG = 'e'
- opts = <Options for ManagedObject>
- ------------------------------------------------------------------------
- File: /usr/local/noc/contrib/lib/django/utils/decorators.py (Line: 24)
- Function: bound_func
- 17 """
- 18 # 'func' is a function at the time it is passed to _dec, but will eventually
- 19 # be a method of the class it is defined it.
- 20 def _dec(func):
- 21 def _wrapper(self, *args, **kwargs):
- 22 @decorator
- 23 def bound_func(*args2, **kwargs2):
- 24 ==> return func(self, *args2, **kwargs2)
- 25 # bound_func has the signature that 'decorator' expects i.e. no
- 26 # 'self' argument, but it is a closure over self so it can call
- 27 # 'func' correctly.
- 28 return bound_func(*args, **kwargs)
- 29 # In case 'decorator' adds attributes to the function it decorates, we
- 30 # want to copy those. We don't have access to bound_func in this scope,
- Variables:
- args2 = (<WSGIRequest
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'action': [u'delete_selected'], u'_selected_action': [u'2'], u'csrfmiddlewaretoken': [u'be8b13c68edc98f74583ad21ed92a08e'], u'post': [u'yes']}>,
- COOKIES:{'csrftoken': 'be8b13c68edc98f74583ad21ed92a08e',
- 'sessionid': '899932577f4c961b279b7975c3f3c51f'},
- META:{'CONTENT_LENGTH': '103',
- 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
- 'CSRF_COOKIE': 'be8b13c68edc98f74583ad21ed92a08e',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'sessionid=899932577f4c961b279b7975c3f3c51f; csrftoken=be8b13c68edc98f74583ad21ed92a08e',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_REFERER': 'http://192.168.10.152/sa/managedobject/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20100101 Firefox/11.0',
- 'PATH_INFO': u'/sa/managedobject/',
- 'QUERY_STRING': '',
- 'REMOTE_ADDR': '127.0.0.1',
- 'REQUEST_METHOD': 'POST',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': '127.0.0.1',
- 'SERVER_PORT': '8000',
- 'SERVER_PROTOCOL': 'HTTP/1.0',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x29227128>,
- 'wsgi.input': <_io.BytesIO object at 0x2afcd23c>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>, {'app': <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x2a9e1eac>})
- func = <function changelist_view at 0x2a01a3ac>
- self = <noc.sa.apps.managedobject.views.ManagedObjectAdmin object at 0x2a9e1f6c>
- kwargs2 = {}
- ------------------------------------------------------------------------
- File: /usr/local/noc/contrib/lib/django/utils/decorators.py (Line: 93)
- Function: _wrapped_view
- 86 if result is not None:
- 87 return result
- 88 if hasattr(middleware, 'process_view'):
- 89 result = middleware.process_view(request, view_func, args, kwargs)
- 90 if result is not None:
- 91 return result
- 92 try:
- 93 ==> response = view_func(request, *args, **kwargs)
- 94 except Exception, e:
- 95 if hasattr(middleware, 'process_exception'):
- 96 result = middleware.process_exception(request, e)
- 97 if result is not None:
- 98 return result
- 99 raise
- Variables:
- e = IntegrityError("<ManagedObject: 2960-KIT-LC-Office> object is referenced from <class 'noc.inv.models.Interface'>",)
- middleware = <django.middleware.csrf.CsrfViewMiddleware object at 0x2a00926c>
- args = ({'app': <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x2a9e1eac>},)
- request = <WSGIRequest
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'action': [u'delete_selected'], u'_selected_action': [u'2'], u'csrfmiddlewaretoken': [u'be8b13c68edc98f74583ad21ed92a08e'], u'post': [u'yes']}>,
- COOKIES:{'csrftoken': 'be8b13c68edc98f74583ad21ed92a08e',
- 'sessionid': '899932577f4c961b279b7975c3f3c51f'},
- META:{'CONTENT_LENGTH': '103',
- 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
- 'CSRF_COOKIE': 'be8b13c68edc98f74583ad21ed92a08e',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'sessionid=899932577f4c961b279b7975c3f3c51f; csrftoken=be8b13c68edc98f74583ad21ed92a08e',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_REFERER': 'http://192.168.10.152/sa/managedobject/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20100101 Firefox/11.0',
- 'PATH_INFO': u'/sa/managedobject/',
- 'QUERY_STRING': '',
- 'REMOTE_ADDR': '127.0.0.1',
- 'REQUEST_METHOD': 'POST',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': '127.0.0.1',
- 'SERVER_PORT': '8000',
- 'SERVER_PROTOCOL': 'HTTP/1.0',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x29227128>,
- 'wsgi.input': <_io.BytesIO object at 0x2afcd23c>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- result = None
- kwargs = {}
- view_func = <function bound_func at 0x2b12b41c>
- ------------------------------------------------------------------------
- File: /usr/local/noc/contrib/lib/django/utils/decorators.py (Line: 28)
- Function: _wrapper
- 21 def _wrapper(self, *args, **kwargs):
- 22 @decorator
- 23 def bound_func(*args2, **kwargs2):
- 24 return func(self, *args2, **kwargs2)
- 25 # bound_func has the signature that 'decorator' expects i.e. no
- 26 # 'self' argument, but it is a closure over self so it can call
- 27 # 'func' correctly.
- 28 ==> return bound_func(*args, **kwargs)
- 29 # In case 'decorator' adds attributes to the function it decorates, we
- 30 # want to copy those. We don't have access to bound_func in this scope,
- 31 # but we can cheat by using it on a dummy function.
- 32 @decorator
- 33 def dummy(*args, **kwargs):
- 34 pass
- Variables:
- self = <noc.sa.apps.managedobject.views.ManagedObjectAdmin object at 0x2a9e1f6c>
- args = (<WSGIRequest
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'action': [u'delete_selected'], u'_selected_action': [u'2'], u'csrfmiddlewaretoken': [u'be8b13c68edc98f74583ad21ed92a08e'], u'post': [u'yes']}>,
- COOKIES:{'csrftoken': 'be8b13c68edc98f74583ad21ed92a08e',
- 'sessionid': '899932577f4c961b279b7975c3f3c51f'},
- META:{'CONTENT_LENGTH': '103',
- 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
- 'CSRF_COOKIE': 'be8b13c68edc98f74583ad21ed92a08e',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'sessionid=899932577f4c961b279b7975c3f3c51f; csrftoken=be8b13c68edc98f74583ad21ed92a08e',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_REFERER': 'http://192.168.10.152/sa/managedobject/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20100101 Firefox/11.0',
- 'PATH_INFO': u'/sa/managedobject/',
- 'QUERY_STRING': '',
- 'REMOTE_ADDR': '127.0.0.1',
- 'REQUEST_METHOD': 'POST',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': '127.0.0.1',
- 'SERVER_PORT': '8000',
- 'SERVER_PROTOCOL': 'HTTP/1.0',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x29227128>,
- 'wsgi.input': <_io.BytesIO object at 0x2afcd23c>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>, {'app': <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x2a9e1eac>})
- bound_func = <function bound_func at 0x2b12b64c>
- func = <function changelist_view at 0x2a01a3ac>
- kwargs = {}
- decorator = <function csrf_protect at 0x2a0175dc>
- ------------------------------------------------------------------------
- File: /usr/local/noc/lib/app/modelapplication.py (Line: 141)
- Function: view_changelist
- 134 self.model._meta.object_name.lower())
- 135
- 136 @view(url=r"^$", url_name="changelist", access=HasPerm("change"),
- 137 menu=get_menu)
- 138 def view_changelist(self, request, extra_context=None):
- 139 """Display changelist"""
- 140 return self.admin.changelist_view(request,
- 141 ==> self.get_context(extra_context))
- 142
- 143 @view(url=r"^add/$", url_name="add", access=HasPerm("add"))
- 144 def view_add(self, request, form_url="", extra_context=None):
- 145 """Display add form"""
- 146 return self.admin.add_view(request,
- 147 extra_context=self.get_context(extra_context))
- Variables:
- self = <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x2a9e1eac>
- extra_context = None
- request = <WSGIRequest
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'action': [u'delete_selected'], u'_selected_action': [u'2'], u'csrfmiddlewaretoken': [u'be8b13c68edc98f74583ad21ed92a08e'], u'post': [u'yes']}>,
- COOKIES:{'csrftoken': 'be8b13c68edc98f74583ad21ed92a08e',
- 'sessionid': '899932577f4c961b279b7975c3f3c51f'},
- META:{'CONTENT_LENGTH': '103',
- 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
- 'CSRF_COOKIE': 'be8b13c68edc98f74583ad21ed92a08e',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'sessionid=899932577f4c961b279b7975c3f3c51f; csrftoken=be8b13c68edc98f74583ad21ed92a08e',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_REFERER': 'http://192.168.10.152/sa/managedobject/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20100101 Firefox/11.0',
- 'PATH_INFO': u'/sa/managedobject/',
- 'QUERY_STRING': '',
- 'REMOTE_ADDR': '127.0.0.1',
- 'REQUEST_METHOD': 'POST',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': '127.0.0.1',
- 'SERVER_PORT': '8000',
- 'SERVER_PROTOCOL': 'HTTP/1.0',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x29227128>,
- 'wsgi.input': <_io.BytesIO object at 0x2afcd23c>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- ------------------------------------------------------------------------
- File: /usr/local/noc/lib/app/site.py (Line: 225)
- Function: inner
- 218 for k, v in request.POST.lists())
- 219 elif request.method == "GET":
- 220 a = dict((k, v[0] if len(v) == 1 else v)
- 221 for k, v in request.GET.lists())
- 222 logging.debug("API %s %s %s" % (request.method,
- 223 request.path, a))
- 224 # Call handler
- 225 ==> r = v(request, *args, **kwargs)
- 226 # Dump SQL statements
- 227 if self.log_sql_statements:
- 228 from django.db import connections
- 229 tsc = 0
- 230 sc = defaultdict(int)
- 231 for conn in connections.all():
- Variables:
- args = ()
- view_map = {'PUT': <bound method ManagedObjectApplication.view_changelist of <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x2a9e1eac>>, 'POST': <bound method ManagedObjectApplication.view_changelist of <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x2a9e1eac>>, 'GET': <bound method ManagedObjectApplication.view_changelist of <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x2a9e1eac>>, 'DELETE': <bound method ManagedObjectApplication.view_changelist of <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x2a9e1eac>>}
- Form = <class 'django.forms.forms.Form'>
- DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
- self = <noc.lib.app.site.Site object at 0x29b62a0c>
- v = <bound method ManagedObjectApplication.view_changelist of <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x2a9e1eac>>
- request = <WSGIRequest
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'action': [u'delete_selected'], u'_selected_action': [u'2'], u'csrfmiddlewaretoken': [u'be8b13c68edc98f74583ad21ed92a08e'], u'post': [u'yes']}>,
- COOKIES:{'csrftoken': 'be8b13c68edc98f74583ad21ed92a08e',
- 'sessionid': '899932577f4c961b279b7975c3f3c51f'},
- META:{'CONTENT_LENGTH': '103',
- 'CONTENT_TYPE': 'application/x-www-form-urlencoded',
- 'CSRF_COOKIE': 'be8b13c68edc98f74583ad21ed92a08e',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-ru,ru;q=0.8,en-us;q=0.5,en;q=0.3',
- 'HTTP_CONNECTION': 'close',
- 'HTTP_COOKIE': 'sessionid=899932577f4c961b279b7975c3f3c51f; csrftoken=be8b13c68edc98f74583ad21ed92a08e',
- 'HTTP_HOST': '127.0.0.1:8000',
- 'HTTP_REFERER': 'http://192.168.10.152/sa/managedobject/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; rv:11.0) Gecko/20100101 Firefox/11.0',
- 'PATH_INFO': u'/sa/managedobject/',
- 'QUERY_STRING': '',
- 'REMOTE_ADDR': '127.0.0.1',
- 'REQUEST_METHOD': 'POST',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': '127.0.0.1',
- 'SERVER_PORT': '8000',
- 'SERVER_PROTOCOL': 'HTTP/1.0',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x29227128>,
- 'wsgi.input': <_io.BytesIO object at 0x2afcd23c>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- to_log_api_call = False
- InterfaceTypeError = <class 'noc.sa.interfaces.base.InterfaceTypeError'>
- PermissionDenied = <class 'noc.lib.app.access.PermissionDenied'>
- kwargs = {}
- app = <noc.sa.apps.managedobject.views.ManagedObjectApplication object at 0x2a9e1eac>
- ------------------------------------------------------------------------
- END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement