Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- UNHANDLED EXCEPTION (2013-01-29 13:51:36.003146)
- Working directory: /opt/noc
- <class 'django.db.utils.IntegrityError'>
- null value in column "password" violates not-null constraint
- START OF TRACEBACK
- ------------------------------------------------------------------------
- File: /opt/noc/contrib/lib/django/db/backends/postgresql_psycopg2/base.py (Line: 52)
- Function: execute
- 45 """
- 46
- 47 def __init__(self, cursor):
- 48 self.cursor = cursor
- 49
- 50 def execute(self, query, args=None):
- 51 try:
- 52 ==> return self.cursor.execute(query, args)
- 53 except Database.IntegrityError, e:
- 54 raise utils.IntegrityError, utils.IntegrityError(*tuple(e)), sys.exc_info()[2]
- 55 except Database.DatabaseError, e:
- 56 raise utils.DatabaseError, utils.DatabaseError(*tuple(e)), sys.exc_info()[2]
- 57
- 58 def executemany(self, query, args):
- Variables:
- query = 'UPDATE "auth_user" SET "username" = %s, "first_name" = %s, "last_name" = %s, "email" = %s, "password" = NULL, "is_staff" = %s, "is_active" = %s, "is_superuser" = %s, "last_login" = %s, "date_joined" = %s WHERE "auth_user"."id" = %s '
- self = <django.db.backends.postgresql_psycopg2.base.CursorWrapper object at 0xae5f1ec>
- args = (u'midesh', u'', u'', u'', True, True, True, u'2013-01-29 13:51:31', u'2013-01-29 13:51:31', 8)
- e = IntegrityError('null value in column "password" violates not-null constraint\n',)
- ------------------------------------------------------------------------
- File: /opt/noc/contrib/lib/django/db/models/sql/compiler.py (Line: 818)
- Function: execute_sql
- 811 except EmptyResultSet:
- 812 if result_type == MULTI:
- 813 return empty_iter()
- 814 else:
- 815 return
- 816
- 817 cursor = self.connection.cursor()
- 818 ==> cursor.execute(sql, params)
- 819
- 820 if not result_type:
- 821 return cursor
- 822 if result_type == SINGLE:
- 823 if self.query.ordering_aliases:
- 824 return cursor.fetchone()[:-len(self.query.ordering_aliases)]
- Variables:
- cursor = <django.db.backends.util.CursorWrapper object at 0xae5f0ec>
- self = <django.db.models.sql.compiler.SQLUpdateCompiler object at 0xae61eac>
- params = (u'midesh', u'', u'', u'', True, True, True, u'2013-01-29 13:51:31', u'2013-01-29 13:51:31', 8)
- result_type = None
- sql = 'UPDATE "auth_user" SET "username" = %s, "first_name" = %s, "last_name" = %s, "email" = %s, "password" = NULL, "is_staff" = %s, "is_active" = %s, "is_superuser" = %s, "last_login" = %s, "date_joined" = %s WHERE "auth_user"."id" = %s '
- ------------------------------------------------------------------------
- File: /opt/noc/contrib/lib/django/db/models/sql/compiler.py (Line: 986)
- Function: execute_sql
- 979 def execute_sql(self, result_type):
- 980 """
- 981 Execute the specified update. Returns the number of rows affected by
- 982 the primary update query. The "primary update query" is the first
- 983 non-empty query that is executed. Row counts for any subsequent,
- 984 related queries are not available.
- 985 """
- 986 ==> cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
- 987 rows = cursor and cursor.rowcount or 0
- 988 is_empty = cursor is None
- 989 del cursor
- 990 for query in self.query.get_related_updates():
- 991 aux_rows = query.get_compiler(self.using).execute_sql(result_type)
- 992 if is_empty:
- Variables:
- self = <django.db.models.sql.compiler.SQLUpdateCompiler object at 0xae61eac>
- result_type = None
- ------------------------------------------------------------------------
- File: /opt/noc/contrib/lib/django/db/models/query.py (Line: 557)
- Function: _update
- 550 useful at that level).
- 551 """
- 552 assert self.query.can_filter(), \
- 553 "Cannot update a query once a slice has been taken."
- 554 query = self.query.clone(sql.UpdateQuery)
- 555 query.add_update_fields(values)
- 556 self._result_cache = None
- 557 ==> return query.get_compiler(self.db).execute_sql(None)
- 558 _update.alters_data = True
- 559
- 560 def exists(self):
- 561 if self._result_cache is None:
- 562 return self.query.has_results(using=self.db)
- 563 return bool(self._result_cache)
- Variables:
- query = <django.db.models.sql.subqueries.UpdateQuery object at 0xae61fcc>
- self = [<User: midesh>]
- values = [(<django.db.models.fields.CharField: username>, None, u'midesh'), (<django.db.models.fields.CharField: first_name>, None, u''), (<django.db.models.fields.CharField: last_name>, None, u''), (<django.db.models.fields.EmailField: email>, None, u''), (<django.db.models.fields.CharField: password>, None, None), (<django.db.models.fields.BooleanField: is_staff>, None, True), (<django.db.models.fields.BooleanField: is_active>, None, True), (<django.db.models.fields.BooleanField: is_superuser>, None, True), (<django.db.models.fields.DateTimeField: last_login>, None, datetime.datetime(2013, 1, 29, 13, 51, 31)), (<django.db.models.fields.DateTimeField: date_joined>, None, datetime.datetime(2013, 1, 29, 13, 51, 31))]
- ------------------------------------------------------------------------
- File: /opt/noc/contrib/lib/django/db/models/base.py (Line: 529)
- Function: save_base
- 522 # Determine whether a record with the primary key already exists.
- 523 if (force_update or (not force_insert and
- 524 manager.using(using).filter(pk=pk_val).exists())):
- 525 # It does already exist, so do an UPDATE.
- 526 if force_update or non_pks:
- 527 values = [(f, None, (raw and getattr(self, f.attname) or f.pre_save(self, False))) for f in non_pks]
- 528 if values:
- 529 ==> rows = manager.using(using).filter(pk=pk_val)._update(values)
- 530 if force_update and not rows:
- 531 raise DatabaseError("Forced update did not affect any rows.")
- 532 else:
- 533 record_exists = False
- 534 if not pk_set or not record_exists:
- 535 if meta.order_with_respect_to:
- Variables:
- origin = <class 'django.contrib.auth.models.User'>
- non_pks = [<django.db.models.fields.CharField: username>, <django.db.models.fields.CharField: first_name>, <django.db.models.fields.CharField: last_name>, <django.db.models.fields.EmailField: email>, <django.db.models.fields.CharField: password>, <django.db.models.fields.BooleanField: is_staff>, <django.db.models.fields.BooleanField: is_active>, <django.db.models.fields.BooleanField: is_superuser>, <django.db.models.fields.DateTimeField: last_login>, <django.db.models.fields.DateTimeField: date_joined>]
- f = <django.db.models.fields.DateTimeField: date_joined>
- self = <User: midesh>
- force_update = False
- raw = False
- manager = <django.db.models.manager.Manager object at 0x9c3a5ec>
- meta = <Options for User>
- values = [(<django.db.models.fields.CharField: username>, None, u'midesh'), (<django.db.models.fields.CharField: first_name>, None, u''), (<django.db.models.fields.CharField: last_name>, None, u''), (<django.db.models.fields.EmailField: email>, None, u''), (<django.db.models.fields.CharField: password>, None, None), (<django.db.models.fields.BooleanField: is_staff>, None, True), (<django.db.models.fields.BooleanField: is_active>, None, True), (<django.db.models.fields.BooleanField: is_superuser>, None, True), (<django.db.models.fields.DateTimeField: last_login>, None, datetime.datetime(2013, 1, 29, 13, 51, 31)), (<django.db.models.fields.DateTimeField: date_joined>, None, datetime.datetime(2013, 1, 29, 13, 51, 31))]
- pk_val = 8
- using = 'default'
- pk_set = True
- org = None
- cls = <class 'django.contrib.auth.models.User'>
- force_insert = False
- record_exists = True
- ------------------------------------------------------------------------
- File: /opt/noc/contrib/lib/django/db/models/base.py (Line: 463)
- Function: save
- 456
- 457 The 'force_insert' and 'force_update' parameters can be used to insist
- 458 that the "save" must be an SQL insert or update (or equivalent for
- 459 non-SQL backends), respectively. Normally, they should not be set.
- 460 """
- 461 if force_insert and force_update:
- 462 raise ValueError("Cannot force both insert and updating in model saving.")
- 463 ==> self.save_base(using=using, force_insert=force_insert, force_update=force_update)
- 464
- 465 save.alters_data = True
- 466
- 467 def save_base(self, raw=False, cls=None, origin=None, force_insert=False,
- 468 force_update=False, using=None):
- 469 """
- Variables:
- using = None
- self = <User: midesh>
- force_update = False
- force_insert = False
- ------------------------------------------------------------------------
- File: /opt/noc/main/apps/user/views.py (Line: 47)
- Function: save
- 40 if args:
- 41 self.new_perms = set([p[5:] for p in args[0] if p.startswith("perm_")])
- 42
- 43 def save(self, commit=True):
- 44 model = super(UserChangeForm, self).save(commit)
- 45 model.is_staff = True
- 46 #if not model.id:
- 47 ==> model.save()
- 48 Permission.set_user_permissions(model, self.new_perms)
- 49 return model
- 50
- 51
- 52 class UserAdmin(DjangoUserAdmin):
- 53 fieldsets = (
- Variables:
- commit = False
- model = <User: midesh>
- self = <django.forms.models.UserForm object at 0xaed49cc>
- ------------------------------------------------------------------------
- File: /opt/noc/contrib/lib/django/contrib/admin/options.py (Line: 703)
- Function: save_form
- 696 messages.info(request, message)
- 697
- 698 def save_form(self, request, form, change):
- 699 """
- 700 Given a ModelForm return an unsaved instance. ``change`` is True if
- 701 the object is being changed, and False if it's being added.
- 702 """
- 703 ==> return form.save(commit=False)
- 704
- 705 def save_model(self, request, obj, form, change):
- 706 """
- 707 Given a model instance save it to the database.
- 708 """
- 709 obj.save()
- Variables:
- self = <noc.main.apps.user.views.UserAdmin object at 0xa66de2c>
- request = <WSGIRequest
- path:/main/user/8/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'username': [u'midesh'], u'first_name': [u''], u'last_name': [u''], u'_save': [u'\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c'], u'is_active': [u'on'], u'initial-date_joined_1': [u'13:51:31'], u'initial-date_joined_0': [u'2013-01-29'], u'is_superuser': [u'on'], u'last_login_1': [u'13:51:31'], u'last_login_0': [u'2013-01-29'], u'date_joined_0': [u'2013-01-29'], u'date_joined_1': [u'13:51:31'], u'csrfmiddlewaretoken': [u'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v'], u'email': [u''], u'initial-last_login_0': [u'2013-01-29'], u'initial-last_login_1': [u'13:51:31']}>,
- COOKIES:{'csrftoken': 'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v',
- 'sessionid': 'd453f9f06700041614c8145d059aceb3'},
- META:{'CONTENT_LENGTH': '1777',
- 'CONTENT_TYPE': 'multipart/form-data; boundary=----WebKitFormBoundaryxUnUKzzoQ144U0aZ',
- 'CSRF_COOKIE': 'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-RU',
- 'HTTP_CONNECTION': 'keep-alive',
- 'HTTP_COOKIE': 'csrftoken=peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v; sessionid=d453f9f06700041614c8145d059aceb3',
- 'HTTP_HOST': '91.201.176.13:8000',
- 'HTTP_ORIGIN': 'http://91.201.176.13:8000',
- 'HTTP_REFERER': 'http://91.201.176.13:8000/main/user/8/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2',
- 'PATH_INFO': u'/main/user/8/',
- 'QUERY_STRING': '',
- 'REMOTE_ADDR': '194.28.62.3',
- 'REQUEST_METHOD': 'POST',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': '91.201.176.13',
- 'SERVER_PORT': '8000',
- 'SERVER_PROTOCOL': 'HTTP/1.1',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x93a3440>,
- 'wsgi.input': <_io.BytesIO object at 0xaece86c>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- form = <django.forms.models.UserForm object at 0xaed49cc>
- change = True
- ------------------------------------------------------------------------
- File: /opt/noc/contrib/lib/django/contrib/admin/options.py (Line: 1037)
- Function: change_view
- 1030 ModelForm = self.get_form(request, obj)
- 1031 formsets = []
- 1032 inline_instances = self.get_inline_instances(request)
- 1033 if request.method == 'POST':
- 1034 form = ModelForm(request.POST, request.FILES, instance=obj)
- 1035 if form.is_valid():
- 1036 form_validated = True
- 1037 ==> new_object = self.save_form(request, form, change=True)
- 1038 else:
- 1039 form_validated = False
- 1040 new_object = obj
- 1041 prefixes = {}
- 1042 for FormSet, inline in zip(self.get_formsets(request, new_object), inline_instances):
- 1043 prefix = FormSet.get_default_prefix()
- Variables:
- obj = <User: midesh>
- form = <django.forms.models.UserForm object at 0xaed49cc>
- form_url = ''
- self = <noc.main.apps.user.views.UserAdmin object at 0xa66de2c>
- request = <WSGIRequest
- path:/main/user/8/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'username': [u'midesh'], u'first_name': [u''], u'last_name': [u''], u'_save': [u'\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c'], u'is_active': [u'on'], u'initial-date_joined_1': [u'13:51:31'], u'initial-date_joined_0': [u'2013-01-29'], u'is_superuser': [u'on'], u'last_login_1': [u'13:51:31'], u'last_login_0': [u'2013-01-29'], u'date_joined_0': [u'2013-01-29'], u'date_joined_1': [u'13:51:31'], u'csrfmiddlewaretoken': [u'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v'], u'email': [u''], u'initial-last_login_0': [u'2013-01-29'], u'initial-last_login_1': [u'13:51:31']}>,
- COOKIES:{'csrftoken': 'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v',
- 'sessionid': 'd453f9f06700041614c8145d059aceb3'},
- META:{'CONTENT_LENGTH': '1777',
- 'CONTENT_TYPE': 'multipart/form-data; boundary=----WebKitFormBoundaryxUnUKzzoQ144U0aZ',
- 'CSRF_COOKIE': 'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-RU',
- 'HTTP_CONNECTION': 'keep-alive',
- 'HTTP_COOKIE': 'csrftoken=peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v; sessionid=d453f9f06700041614c8145d059aceb3',
- 'HTTP_HOST': '91.201.176.13:8000',
- 'HTTP_ORIGIN': 'http://91.201.176.13:8000',
- 'HTTP_REFERER': 'http://91.201.176.13:8000/main/user/8/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2',
- 'PATH_INFO': u'/main/user/8/',
- 'QUERY_STRING': '',
- 'REMOTE_ADDR': '194.28.62.3',
- 'REQUEST_METHOD': 'POST',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': '91.201.176.13',
- 'SERVER_PORT': '8000',
- 'SERVER_PROTOCOL': 'HTTP/1.1',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x93a3440>,
- 'wsgi.input': <_io.BytesIO object at 0xaece86c>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- object_id = u'8'
- form_validated = True
- inline_instances = []
- formsets = []
- model = <class 'django.contrib.auth.models.User'>
- extra_context = {'app': <noc.main.apps.user.views.UserApplication object at 0xa66dd4c>}
- ModelForm = <class 'django.forms.models.UserForm'>
- opts = <Options for User>
- ------------------------------------------------------------------------
- File: /opt/noc/contrib/lib/django/db/transaction.py (Line: 209)
- Function: inner
- 202 def __exit__(self, exc_type, exc_value, traceback):
- 203 self.exiting(exc_value, self.using)
- 204
- 205 def __call__(self, func):
- 206 @wraps(func)
- 207 def inner(*args, **kwargs):
- 208 with self:
- 209 ==> return func(*args, **kwargs)
- 210 return inner
- 211
- 212 def _transaction_func(entering, exiting, using):
- 213 """
- 214 Takes 3 things, an entering function (what to do to start this block of
- 215 transaction management), an exiting function (what to do to end it, on both
- Variables:
- self = <django.db.transaction.Transaction object at 0x9cafd2c>
- args = (<noc.main.apps.user.views.UserAdmin object at 0xa66de2c>, <WSGIRequest
- path:/main/user/8/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'username': [u'midesh'], u'first_name': [u''], u'last_name': [u''], u'_save': [u'\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c'], u'is_active': [u'on'], u'initial-date_joined_1': [u'13:51:31'], u'initial-date_joined_0': [u'2013-01-29'], u'is_superuser': [u'on'], u'last_login_1': [u'13:51:31'], u'last_login_0': [u'2013-01-29'], u'date_joined_0': [u'2013-01-29'], u'date_joined_1': [u'13:51:31'], u'csrfmiddlewaretoken': [u'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v'], u'email': [u''], u'initial-last_login_0': [u'2013-01-29'], u'initial-last_login_1': [u'13:51:31']}>,
- COOKIES:{'csrftoken': 'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v',
- 'sessionid': 'd453f9f06700041614c8145d059aceb3'},
- META:{'CONTENT_LENGTH': '1777',
- 'CONTENT_TYPE': 'multipart/form-data; boundary=----WebKitFormBoundaryxUnUKzzoQ144U0aZ',
- 'CSRF_COOKIE': 'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-RU',
- 'HTTP_CONNECTION': 'keep-alive',
- 'HTTP_COOKIE': 'csrftoken=peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v; sessionid=d453f9f06700041614c8145d059aceb3',
- 'HTTP_HOST': '91.201.176.13:8000',
- 'HTTP_ORIGIN': 'http://91.201.176.13:8000',
- 'HTTP_REFERER': 'http://91.201.176.13:8000/main/user/8/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2',
- 'PATH_INFO': u'/main/user/8/',
- 'QUERY_STRING': '',
- 'REMOTE_ADDR': '194.28.62.3',
- 'REQUEST_METHOD': 'POST',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': '91.201.176.13',
- 'SERVER_PORT': '8000',
- 'SERVER_PROTOCOL': 'HTTP/1.1',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x93a3440>,
- 'wsgi.input': <_io.BytesIO object at 0xaece86c>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>, u'8')
- func = <function change_view at 0x9cb3f0c>
- kwargs = {'extra_context': {'app': <noc.main.apps.user.views.UserApplication object at 0xa66dd4c>}}
- ------------------------------------------------------------------------
- File: /opt/noc/contrib/lib/django/utils/decorators.py (Line: 21)
- Function: bound_func
- 14 """
- 15 # 'func' is a function at the time it is passed to _dec, but will eventually
- 16 # be a method of the class it is defined it.
- 17 def _dec(func):
- 18 def _wrapper(self, *args, **kwargs):
- 19 @decorator
- 20 def bound_func(*args2, **kwargs2):
- 21 ==> return func(self, *args2, **kwargs2)
- 22 # bound_func has the signature that 'decorator' expects i.e. no
- 23 # 'self' argument, but it is a closure over self so it can call
- 24 # 'func' correctly.
- 25 return bound_func(*args, **kwargs)
- 26 # In case 'decorator' adds attributes to the function it decorates, we
- 27 # want to copy those. We don't have access to bound_func in this scope,
- Variables:
- args2 = (<WSGIRequest
- path:/main/user/8/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'username': [u'midesh'], u'first_name': [u''], u'last_name': [u''], u'_save': [u'\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c'], u'is_active': [u'on'], u'initial-date_joined_1': [u'13:51:31'], u'initial-date_joined_0': [u'2013-01-29'], u'is_superuser': [u'on'], u'last_login_1': [u'13:51:31'], u'last_login_0': [u'2013-01-29'], u'date_joined_0': [u'2013-01-29'], u'date_joined_1': [u'13:51:31'], u'csrfmiddlewaretoken': [u'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v'], u'email': [u''], u'initial-last_login_0': [u'2013-01-29'], u'initial-last_login_1': [u'13:51:31']}>,
- COOKIES:{'csrftoken': 'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v',
- 'sessionid': 'd453f9f06700041614c8145d059aceb3'},
- META:{'CONTENT_LENGTH': '1777',
- 'CONTENT_TYPE': 'multipart/form-data; boundary=----WebKitFormBoundaryxUnUKzzoQ144U0aZ',
- 'CSRF_COOKIE': 'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-RU',
- 'HTTP_CONNECTION': 'keep-alive',
- 'HTTP_COOKIE': 'csrftoken=peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v; sessionid=d453f9f06700041614c8145d059aceb3',
- 'HTTP_HOST': '91.201.176.13:8000',
- 'HTTP_ORIGIN': 'http://91.201.176.13:8000',
- 'HTTP_REFERER': 'http://91.201.176.13:8000/main/user/8/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2',
- 'PATH_INFO': u'/main/user/8/',
- 'QUERY_STRING': '',
- 'REMOTE_ADDR': '194.28.62.3',
- 'REQUEST_METHOD': 'POST',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': '91.201.176.13',
- 'SERVER_PORT': '8000',
- 'SERVER_PROTOCOL': 'HTTP/1.1',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x93a3440>,
- 'wsgi.input': <_io.BytesIO object at 0xaece86c>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>, u'8')
- func = <function change_view at 0x9cb3f7c>
- self = <noc.main.apps.user.views.UserAdmin object at 0xa66de2c>
- kwargs2 = {'extra_context': {'app': <noc.main.apps.user.views.UserApplication object at 0xa66dd4c>}}
- ------------------------------------------------------------------------
- File: /opt/noc/contrib/lib/django/utils/decorators.py (Line: 91)
- Function: _wrapped_view
- 84 if result is not None:
- 85 return result
- 86 if hasattr(middleware, 'process_view'):
- 87 result = middleware.process_view(request, view_func, args, kwargs)
- 88 if result is not None:
- 89 return result
- 90 try:
- 91 ==> response = view_func(request, *args, **kwargs)
- 92 except Exception, e:
- 93 if hasattr(middleware, 'process_exception'):
- 94 result = middleware.process_exception(request, e)
- 95 if result is not None:
- 96 return result
- 97 raise
- Variables:
- e = IntegrityError('null value in column "password" violates not-null constraint\n',)
- middleware = <django.middleware.csrf.CsrfViewMiddleware object at 0x9ca0eac>
- args = (u'8',)
- request = <WSGIRequest
- path:/main/user/8/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'username': [u'midesh'], u'first_name': [u''], u'last_name': [u''], u'_save': [u'\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c'], u'is_active': [u'on'], u'initial-date_joined_1': [u'13:51:31'], u'initial-date_joined_0': [u'2013-01-29'], u'is_superuser': [u'on'], u'last_login_1': [u'13:51:31'], u'last_login_0': [u'2013-01-29'], u'date_joined_0': [u'2013-01-29'], u'date_joined_1': [u'13:51:31'], u'csrfmiddlewaretoken': [u'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v'], u'email': [u''], u'initial-last_login_0': [u'2013-01-29'], u'initial-last_login_1': [u'13:51:31']}>,
- COOKIES:{'csrftoken': 'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v',
- 'sessionid': 'd453f9f06700041614c8145d059aceb3'},
- META:{'CONTENT_LENGTH': '1777',
- 'CONTENT_TYPE': 'multipart/form-data; boundary=----WebKitFormBoundaryxUnUKzzoQ144U0aZ',
- 'CSRF_COOKIE': 'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-RU',
- 'HTTP_CONNECTION': 'keep-alive',
- 'HTTP_COOKIE': 'csrftoken=peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v; sessionid=d453f9f06700041614c8145d059aceb3',
- 'HTTP_HOST': '91.201.176.13:8000',
- 'HTTP_ORIGIN': 'http://91.201.176.13:8000',
- 'HTTP_REFERER': 'http://91.201.176.13:8000/main/user/8/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2',
- 'PATH_INFO': u'/main/user/8/',
- 'QUERY_STRING': '',
- 'REMOTE_ADDR': '194.28.62.3',
- 'REQUEST_METHOD': 'POST',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': '91.201.176.13',
- 'SERVER_PORT': '8000',
- 'SERVER_PROTOCOL': 'HTTP/1.1',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x93a3440>,
- 'wsgi.input': <_io.BytesIO object at 0xaece86c>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- result = None
- kwargs = {'extra_context': {'app': <noc.main.apps.user.views.UserApplication object at 0xa66dd4c>}}
- view_func = <function bound_func at 0xae7a64c>
- ------------------------------------------------------------------------
- File: /opt/noc/contrib/lib/django/utils/decorators.py (Line: 25)
- Function: _wrapper
- 18 def _wrapper(self, *args, **kwargs):
- 19 @decorator
- 20 def bound_func(*args2, **kwargs2):
- 21 return func(self, *args2, **kwargs2)
- 22 # bound_func has the signature that 'decorator' expects i.e. no
- 23 # 'self' argument, but it is a closure over self so it can call
- 24 # 'func' correctly.
- 25 ==> return bound_func(*args, **kwargs)
- 26 # In case 'decorator' adds attributes to the function it decorates, we
- 27 # want to copy those. We don't have access to bound_func in this scope,
- 28 # but we can cheat by using it on a dummy function.
- 29 @decorator
- 30 def dummy(*args, **kwargs):
- 31 pass
- Variables:
- self = <noc.main.apps.user.views.UserAdmin object at 0xa66de2c>
- args = (<WSGIRequest
- path:/main/user/8/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'username': [u'midesh'], u'first_name': [u''], u'last_name': [u''], u'_save': [u'\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c'], u'is_active': [u'on'], u'initial-date_joined_1': [u'13:51:31'], u'initial-date_joined_0': [u'2013-01-29'], u'is_superuser': [u'on'], u'last_login_1': [u'13:51:31'], u'last_login_0': [u'2013-01-29'], u'date_joined_0': [u'2013-01-29'], u'date_joined_1': [u'13:51:31'], u'csrfmiddlewaretoken': [u'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v'], u'email': [u''], u'initial-last_login_0': [u'2013-01-29'], u'initial-last_login_1': [u'13:51:31']}>,
- COOKIES:{'csrftoken': 'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v',
- 'sessionid': 'd453f9f06700041614c8145d059aceb3'},
- META:{'CONTENT_LENGTH': '1777',
- 'CONTENT_TYPE': 'multipart/form-data; boundary=----WebKitFormBoundaryxUnUKzzoQ144U0aZ',
- 'CSRF_COOKIE': 'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-RU',
- 'HTTP_CONNECTION': 'keep-alive',
- 'HTTP_COOKIE': 'csrftoken=peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v; sessionid=d453f9f06700041614c8145d059aceb3',
- 'HTTP_HOST': '91.201.176.13:8000',
- 'HTTP_ORIGIN': 'http://91.201.176.13:8000',
- 'HTTP_REFERER': 'http://91.201.176.13:8000/main/user/8/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2',
- 'PATH_INFO': u'/main/user/8/',
- 'QUERY_STRING': '',
- 'REMOTE_ADDR': '194.28.62.3',
- 'REQUEST_METHOD': 'POST',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': '91.201.176.13',
- 'SERVER_PORT': '8000',
- 'SERVER_PROTOCOL': 'HTTP/1.1',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x93a3440>,
- 'wsgi.input': <_io.BytesIO object at 0xaece86c>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>, u'8')
- bound_func = <function bound_func at 0xae7a8b4>
- func = <function change_view at 0x9cb3f7c>
- kwargs = {'extra_context': {'app': <noc.main.apps.user.views.UserApplication object at 0xa66dd4c>}}
- decorator = <function csrf_protect at 0x9ca872c>
- ------------------------------------------------------------------------
- File: /opt/noc/lib/app/modelapplication.py (Line: 173)
- Function: view_change
- 166
- 167 @view(url=r"^(\d+)/$", url_name="change", access=HasPerm("change"))
- 168 def view_change(self, request, object_id, extra_context=None):
- 169 """Display change form"""
- 170 return self.admin.change_view(
- 171 request,
- 172 object_id,
- 173 ==> extra_context=self.get_context(extra_context))
- 174
- 175 ##
- 176 ## Backport from ExtApplication/ExtModelApplication for lookup support
- 177 ##
- 178 ignored_params = ["_dc"]
- 179 page_param = "__page"
- Variables:
- self = <noc.main.apps.user.views.UserApplication object at 0xa66dd4c>
- extra_context = None
- request = <WSGIRequest
- path:/main/user/8/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'username': [u'midesh'], u'first_name': [u''], u'last_name': [u''], u'_save': [u'\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c'], u'is_active': [u'on'], u'initial-date_joined_1': [u'13:51:31'], u'initial-date_joined_0': [u'2013-01-29'], u'is_superuser': [u'on'], u'last_login_1': [u'13:51:31'], u'last_login_0': [u'2013-01-29'], u'date_joined_0': [u'2013-01-29'], u'date_joined_1': [u'13:51:31'], u'csrfmiddlewaretoken': [u'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v'], u'email': [u''], u'initial-last_login_0': [u'2013-01-29'], u'initial-last_login_1': [u'13:51:31']}>,
- COOKIES:{'csrftoken': 'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v',
- 'sessionid': 'd453f9f06700041614c8145d059aceb3'},
- META:{'CONTENT_LENGTH': '1777',
- 'CONTENT_TYPE': 'multipart/form-data; boundary=----WebKitFormBoundaryxUnUKzzoQ144U0aZ',
- 'CSRF_COOKIE': 'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-RU',
- 'HTTP_CONNECTION': 'keep-alive',
- 'HTTP_COOKIE': 'csrftoken=peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v; sessionid=d453f9f06700041614c8145d059aceb3',
- 'HTTP_HOST': '91.201.176.13:8000',
- 'HTTP_ORIGIN': 'http://91.201.176.13:8000',
- 'HTTP_REFERER': 'http://91.201.176.13:8000/main/user/8/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2',
- 'PATH_INFO': u'/main/user/8/',
- 'QUERY_STRING': '',
- 'REMOTE_ADDR': '194.28.62.3',
- 'REQUEST_METHOD': 'POST',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': '91.201.176.13',
- 'SERVER_PORT': '8000',
- 'SERVER_PROTOCOL': 'HTTP/1.1',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x93a3440>,
- 'wsgi.input': <_io.BytesIO object at 0xaece86c>,
- 'wsgi.multiprocess': True,
- 'wsgi.multithread': False,
- 'wsgi.run_once': False,
- 'wsgi.url_scheme': 'http',
- 'wsgi.version': (1, 0)}>
- object_id = u'8'
- ------------------------------------------------------------------------
- File: /opt/noc/lib/app/site.py (Line: 232)
- Function: inner
- 225 for k, v in request.POST.lists())
- 226 elif request.method == "GET":
- 227 a = dict((k, v[0] if len(v) == 1 else v)
- 228 for k, v in request.GET.lists())
- 229 logging.debug("API %s %s %s" % (request.method,
- 230 request.path, a))
- 231 # Call handler
- 232 ==> r = v(request, *args, **kwargs)
- 233 # Dump SQL statements
- 234 if self.log_sql_statements:
- 235 from django.db import connections
- 236 tsc = 0
- 237 sc = defaultdict(int)
- 238 for conn in connections.all():
- Variables:
- args = (u'8',)
- view_map = {'PUT': <bound method UserApplication.view_change of <noc.main.apps.user.views.UserApplication object at 0xa66dd4c>>, 'POST': <bound method UserApplication.view_change of <noc.main.apps.user.views.UserApplication object at 0xa66dd4c>>, 'GET': <bound method UserApplication.view_change of <noc.main.apps.user.views.UserApplication object at 0xa66dd4c>>, 'DELETE': <bound method UserApplication.view_change of <noc.main.apps.user.views.UserApplication object at 0xa66dd4c>>}
- Form = <class 'django.forms.forms.Form'>
- DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
- self = <noc.lib.app.site.Site object at 0x9bdf92c>
- v = <bound method UserApplication.view_change of <noc.main.apps.user.views.UserApplication object at 0xa66dd4c>>
- request = <WSGIRequest
- path:/main/user/8/,
- GET:<QueryDict: {}>,
- POST:<QueryDict: {u'username': [u'midesh'], u'first_name': [u''], u'last_name': [u''], u'_save': [u'\u0421\u043e\u0445\u0440\u0430\u043d\u0438\u0442\u044c'], u'is_active': [u'on'], u'initial-date_joined_1': [u'13:51:31'], u'initial-date_joined_0': [u'2013-01-29'], u'is_superuser': [u'on'], u'last_login_1': [u'13:51:31'], u'last_login_0': [u'2013-01-29'], u'date_joined_0': [u'2013-01-29'], u'date_joined_1': [u'13:51:31'], u'csrfmiddlewaretoken': [u'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v'], u'email': [u''], u'initial-last_login_0': [u'2013-01-29'], u'initial-last_login_1': [u'13:51:31']}>,
- COOKIES:{'csrftoken': 'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v',
- 'sessionid': 'd453f9f06700041614c8145d059aceb3'},
- META:{'CONTENT_LENGTH': '1777',
- 'CONTENT_TYPE': 'multipart/form-data; boundary=----WebKitFormBoundaryxUnUKzzoQ144U0aZ',
- 'CSRF_COOKIE': 'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v',
- 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
- 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
- 'HTTP_ACCEPT_LANGUAGE': 'ru-RU',
- 'HTTP_CONNECTION': 'keep-alive',
- 'HTTP_COOKIE': 'csrftoken=peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v; sessionid=d453f9f06700041614c8145d059aceb3',
- 'HTTP_HOST': '91.201.176.13:8000',
- 'HTTP_ORIGIN': 'http://91.201.176.13:8000',
- 'HTTP_REFERER': 'http://91.201.176.13:8000/main/user/8/',
- 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2',
- 'PATH_INFO': u'/main/user/8/',
- 'QUERY_STRING': '',
- 'REMOTE_ADDR': '194.28.62.3',
- 'REQUEST_METHOD': 'POST',
- 'SCRIPT_NAME': u'',
- 'SERVER_NAME': '91.201.176.13',
- 'SERVER_PORT': '8000',
- 'SERVER_PROTOCOL': 'HTTP/1.1',
- 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x93a3440>,
- 'wsgi.input': <_io.BytesIO object at 0xaece86c>,
- '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.main.apps.user.views.UserApplication object at 0xa66dd4c>
- ------------------------------------------------------------------------
- END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement