Advertisement
Guest User

Untitled

a guest
Jan 29th, 2013
48
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 37.16 KB | None | 0 0
  1. UNHANDLED EXCEPTION (2013-01-29 13:51:36.003146)
  2. Working directory: /opt/noc
  3. <class 'django.db.utils.IntegrityError'>
  4. null value in column "password" violates not-null constraint
  5.  
  6. START OF TRACEBACK
  7. ------------------------------------------------------------------------
  8. File: /opt/noc/contrib/lib/django/db/backends/postgresql_psycopg2/base.py (Line: 52)
  9. Function: execute
  10. 45 """
  11. 46
  12. 47 def __init__(self, cursor):
  13. 48 self.cursor = cursor
  14. 49
  15. 50 def execute(self, query, args=None):
  16. 51 try:
  17. 52 ==> return self.cursor.execute(query, args)
  18. 53 except Database.IntegrityError, e:
  19. 54 raise utils.IntegrityError, utils.IntegrityError(*tuple(e)), sys.exc_info()[2]
  20. 55 except Database.DatabaseError, e:
  21. 56 raise utils.DatabaseError, utils.DatabaseError(*tuple(e)), sys.exc_info()[2]
  22. 57
  23. 58 def executemany(self, query, args):
  24. Variables:
  25. 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 '
  26. self = <django.db.backends.postgresql_psycopg2.base.CursorWrapper object at 0xae5f1ec>
  27. args = (u'midesh', u'', u'', u'', True, True, True, u'2013-01-29 13:51:31', u'2013-01-29 13:51:31', 8)
  28. e = IntegrityError('null value in column "password" violates not-null constraint\n',)
  29. ------------------------------------------------------------------------
  30. File: /opt/noc/contrib/lib/django/db/models/sql/compiler.py (Line: 818)
  31. Function: execute_sql
  32. 811 except EmptyResultSet:
  33. 812 if result_type == MULTI:
  34. 813 return empty_iter()
  35. 814 else:
  36. 815 return
  37. 816
  38. 817 cursor = self.connection.cursor()
  39. 818 ==> cursor.execute(sql, params)
  40. 819
  41. 820 if not result_type:
  42. 821 return cursor
  43. 822 if result_type == SINGLE:
  44. 823 if self.query.ordering_aliases:
  45. 824 return cursor.fetchone()[:-len(self.query.ordering_aliases)]
  46. Variables:
  47. cursor = <django.db.backends.util.CursorWrapper object at 0xae5f0ec>
  48. self = <django.db.models.sql.compiler.SQLUpdateCompiler object at 0xae61eac>
  49. params = (u'midesh', u'', u'', u'', True, True, True, u'2013-01-29 13:51:31', u'2013-01-29 13:51:31', 8)
  50. result_type = None
  51. 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 '
  52. ------------------------------------------------------------------------
  53. File: /opt/noc/contrib/lib/django/db/models/sql/compiler.py (Line: 986)
  54. Function: execute_sql
  55. 979 def execute_sql(self, result_type):
  56. 980 """
  57. 981 Execute the specified update. Returns the number of rows affected by
  58. 982 the primary update query. The "primary update query" is the first
  59. 983 non-empty query that is executed. Row counts for any subsequent,
  60. 984 related queries are not available.
  61. 985 """
  62. 986 ==> cursor = super(SQLUpdateCompiler, self).execute_sql(result_type)
  63. 987 rows = cursor and cursor.rowcount or 0
  64. 988 is_empty = cursor is None
  65. 989 del cursor
  66. 990 for query in self.query.get_related_updates():
  67. 991 aux_rows = query.get_compiler(self.using).execute_sql(result_type)
  68. 992 if is_empty:
  69. Variables:
  70. self = <django.db.models.sql.compiler.SQLUpdateCompiler object at 0xae61eac>
  71. result_type = None
  72. ------------------------------------------------------------------------
  73. File: /opt/noc/contrib/lib/django/db/models/query.py (Line: 557)
  74. Function: _update
  75. 550 useful at that level).
  76. 551 """
  77. 552 assert self.query.can_filter(), \
  78. 553 "Cannot update a query once a slice has been taken."
  79. 554 query = self.query.clone(sql.UpdateQuery)
  80. 555 query.add_update_fields(values)
  81. 556 self._result_cache = None
  82. 557 ==> return query.get_compiler(self.db).execute_sql(None)
  83. 558 _update.alters_data = True
  84. 559
  85. 560 def exists(self):
  86. 561 if self._result_cache is None:
  87. 562 return self.query.has_results(using=self.db)
  88. 563 return bool(self._result_cache)
  89. Variables:
  90. query = <django.db.models.sql.subqueries.UpdateQuery object at 0xae61fcc>
  91. self = [<User: midesh>]
  92. 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))]
  93. ------------------------------------------------------------------------
  94. File: /opt/noc/contrib/lib/django/db/models/base.py (Line: 529)
  95. Function: save_base
  96. 522 # Determine whether a record with the primary key already exists.
  97. 523 if (force_update or (not force_insert and
  98. 524 manager.using(using).filter(pk=pk_val).exists())):
  99. 525 # It does already exist, so do an UPDATE.
  100. 526 if force_update or non_pks:
  101. 527 values = [(f, None, (raw and getattr(self, f.attname) or f.pre_save(self, False))) for f in non_pks]
  102. 528 if values:
  103. 529 ==> rows = manager.using(using).filter(pk=pk_val)._update(values)
  104. 530 if force_update and not rows:
  105. 531 raise DatabaseError("Forced update did not affect any rows.")
  106. 532 else:
  107. 533 record_exists = False
  108. 534 if not pk_set or not record_exists:
  109. 535 if meta.order_with_respect_to:
  110. Variables:
  111. origin = <class 'django.contrib.auth.models.User'>
  112. 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>]
  113. f = <django.db.models.fields.DateTimeField: date_joined>
  114. self = <User: midesh>
  115. force_update = False
  116. raw = False
  117. manager = <django.db.models.manager.Manager object at 0x9c3a5ec>
  118. meta = <Options for User>
  119. 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))]
  120. pk_val = 8
  121. using = 'default'
  122. pk_set = True
  123. org = None
  124. cls = <class 'django.contrib.auth.models.User'>
  125. force_insert = False
  126. record_exists = True
  127. ------------------------------------------------------------------------
  128. File: /opt/noc/contrib/lib/django/db/models/base.py (Line: 463)
  129. Function: save
  130. 456
  131. 457 The 'force_insert' and 'force_update' parameters can be used to insist
  132. 458 that the "save" must be an SQL insert or update (or equivalent for
  133. 459 non-SQL backends), respectively. Normally, they should not be set.
  134. 460 """
  135. 461 if force_insert and force_update:
  136. 462 raise ValueError("Cannot force both insert and updating in model saving.")
  137. 463 ==> self.save_base(using=using, force_insert=force_insert, force_update=force_update)
  138. 464
  139. 465 save.alters_data = True
  140. 466
  141. 467 def save_base(self, raw=False, cls=None, origin=None, force_insert=False,
  142. 468 force_update=False, using=None):
  143. 469 """
  144. Variables:
  145. using = None
  146. self = <User: midesh>
  147. force_update = False
  148. force_insert = False
  149. ------------------------------------------------------------------------
  150. File: /opt/noc/main/apps/user/views.py (Line: 47)
  151. Function: save
  152. 40 if args:
  153. 41 self.new_perms = set([p[5:] for p in args[0] if p.startswith("perm_")])
  154. 42
  155. 43 def save(self, commit=True):
  156. 44 model = super(UserChangeForm, self).save(commit)
  157. 45 model.is_staff = True
  158. 46 #if not model.id:
  159. 47 ==> model.save()
  160. 48 Permission.set_user_permissions(model, self.new_perms)
  161. 49 return model
  162. 50
  163. 51
  164. 52 class UserAdmin(DjangoUserAdmin):
  165. 53 fieldsets = (
  166. Variables:
  167. commit = False
  168. model = <User: midesh>
  169. self = <django.forms.models.UserForm object at 0xaed49cc>
  170. ------------------------------------------------------------------------
  171. File: /opt/noc/contrib/lib/django/contrib/admin/options.py (Line: 703)
  172. Function: save_form
  173. 696 messages.info(request, message)
  174. 697
  175. 698 def save_form(self, request, form, change):
  176. 699 """
  177. 700 Given a ModelForm return an unsaved instance. ``change`` is True if
  178. 701 the object is being changed, and False if it's being added.
  179. 702 """
  180. 703 ==> return form.save(commit=False)
  181. 704
  182. 705 def save_model(self, request, obj, form, change):
  183. 706 """
  184. 707 Given a model instance save it to the database.
  185. 708 """
  186. 709 obj.save()
  187. Variables:
  188. self = <noc.main.apps.user.views.UserAdmin object at 0xa66de2c>
  189. request = <WSGIRequest
  190. path:/main/user/8/,
  191. GET:<QueryDict: {}>,
  192. 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']}>,
  193. COOKIES:{'csrftoken': 'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v',
  194. 'sessionid': 'd453f9f06700041614c8145d059aceb3'},
  195. META:{'CONTENT_LENGTH': '1777',
  196. 'CONTENT_TYPE': 'multipart/form-data; boundary=----WebKitFormBoundaryxUnUKzzoQ144U0aZ',
  197. 'CSRF_COOKIE': 'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v',
  198. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  199. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  200. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU',
  201. 'HTTP_CONNECTION': 'keep-alive',
  202. 'HTTP_COOKIE': 'csrftoken=peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v; sessionid=d453f9f06700041614c8145d059aceb3',
  203. 'HTTP_HOST': '91.201.176.13:8000',
  204. 'HTTP_ORIGIN': 'http://91.201.176.13:8000',
  205. 'HTTP_REFERER': 'http://91.201.176.13:8000/main/user/8/',
  206. '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',
  207. 'PATH_INFO': u'/main/user/8/',
  208. 'QUERY_STRING': '',
  209. 'REMOTE_ADDR': '194.28.62.3',
  210. 'REQUEST_METHOD': 'POST',
  211. 'SCRIPT_NAME': u'',
  212. 'SERVER_NAME': '91.201.176.13',
  213. 'SERVER_PORT': '8000',
  214. 'SERVER_PROTOCOL': 'HTTP/1.1',
  215. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x93a3440>,
  216. 'wsgi.input': <_io.BytesIO object at 0xaece86c>,
  217. 'wsgi.multiprocess': True,
  218. 'wsgi.multithread': False,
  219. 'wsgi.run_once': False,
  220. 'wsgi.url_scheme': 'http',
  221. 'wsgi.version': (1, 0)}>
  222. form = <django.forms.models.UserForm object at 0xaed49cc>
  223. change = True
  224. ------------------------------------------------------------------------
  225. File: /opt/noc/contrib/lib/django/contrib/admin/options.py (Line: 1037)
  226. Function: change_view
  227. 1030 ModelForm = self.get_form(request, obj)
  228. 1031 formsets = []
  229. 1032 inline_instances = self.get_inline_instances(request)
  230. 1033 if request.method == 'POST':
  231. 1034 form = ModelForm(request.POST, request.FILES, instance=obj)
  232. 1035 if form.is_valid():
  233. 1036 form_validated = True
  234. 1037 ==> new_object = self.save_form(request, form, change=True)
  235. 1038 else:
  236. 1039 form_validated = False
  237. 1040 new_object = obj
  238. 1041 prefixes = {}
  239. 1042 for FormSet, inline in zip(self.get_formsets(request, new_object), inline_instances):
  240. 1043 prefix = FormSet.get_default_prefix()
  241. Variables:
  242. obj = <User: midesh>
  243. form = <django.forms.models.UserForm object at 0xaed49cc>
  244. form_url = ''
  245. self = <noc.main.apps.user.views.UserAdmin object at 0xa66de2c>
  246. request = <WSGIRequest
  247. path:/main/user/8/,
  248. GET:<QueryDict: {}>,
  249. 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']}>,
  250. COOKIES:{'csrftoken': 'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v',
  251. 'sessionid': 'd453f9f06700041614c8145d059aceb3'},
  252. META:{'CONTENT_LENGTH': '1777',
  253. 'CONTENT_TYPE': 'multipart/form-data; boundary=----WebKitFormBoundaryxUnUKzzoQ144U0aZ',
  254. 'CSRF_COOKIE': 'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v',
  255. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  256. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  257. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU',
  258. 'HTTP_CONNECTION': 'keep-alive',
  259. 'HTTP_COOKIE': 'csrftoken=peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v; sessionid=d453f9f06700041614c8145d059aceb3',
  260. 'HTTP_HOST': '91.201.176.13:8000',
  261. 'HTTP_ORIGIN': 'http://91.201.176.13:8000',
  262. 'HTTP_REFERER': 'http://91.201.176.13:8000/main/user/8/',
  263. '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',
  264. 'PATH_INFO': u'/main/user/8/',
  265. 'QUERY_STRING': '',
  266. 'REMOTE_ADDR': '194.28.62.3',
  267. 'REQUEST_METHOD': 'POST',
  268. 'SCRIPT_NAME': u'',
  269. 'SERVER_NAME': '91.201.176.13',
  270. 'SERVER_PORT': '8000',
  271. 'SERVER_PROTOCOL': 'HTTP/1.1',
  272. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x93a3440>,
  273. 'wsgi.input': <_io.BytesIO object at 0xaece86c>,
  274. 'wsgi.multiprocess': True,
  275. 'wsgi.multithread': False,
  276. 'wsgi.run_once': False,
  277. 'wsgi.url_scheme': 'http',
  278. 'wsgi.version': (1, 0)}>
  279. object_id = u'8'
  280. form_validated = True
  281. inline_instances = []
  282. formsets = []
  283. model = <class 'django.contrib.auth.models.User'>
  284. extra_context = {'app': <noc.main.apps.user.views.UserApplication object at 0xa66dd4c>}
  285. ModelForm = <class 'django.forms.models.UserForm'>
  286. opts = <Options for User>
  287. ------------------------------------------------------------------------
  288. File: /opt/noc/contrib/lib/django/db/transaction.py (Line: 209)
  289. Function: inner
  290. 202 def __exit__(self, exc_type, exc_value, traceback):
  291. 203 self.exiting(exc_value, self.using)
  292. 204
  293. 205 def __call__(self, func):
  294. 206 @wraps(func)
  295. 207 def inner(*args, **kwargs):
  296. 208 with self:
  297. 209 ==> return func(*args, **kwargs)
  298. 210 return inner
  299. 211
  300. 212 def _transaction_func(entering, exiting, using):
  301. 213 """
  302. 214 Takes 3 things, an entering function (what to do to start this block of
  303. 215 transaction management), an exiting function (what to do to end it, on both
  304. Variables:
  305. self = <django.db.transaction.Transaction object at 0x9cafd2c>
  306. args = (<noc.main.apps.user.views.UserAdmin object at 0xa66de2c>, <WSGIRequest
  307. path:/main/user/8/,
  308. GET:<QueryDict: {}>,
  309. 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']}>,
  310. COOKIES:{'csrftoken': 'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v',
  311. 'sessionid': 'd453f9f06700041614c8145d059aceb3'},
  312. META:{'CONTENT_LENGTH': '1777',
  313. 'CONTENT_TYPE': 'multipart/form-data; boundary=----WebKitFormBoundaryxUnUKzzoQ144U0aZ',
  314. 'CSRF_COOKIE': 'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v',
  315. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  316. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  317. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU',
  318. 'HTTP_CONNECTION': 'keep-alive',
  319. 'HTTP_COOKIE': 'csrftoken=peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v; sessionid=d453f9f06700041614c8145d059aceb3',
  320. 'HTTP_HOST': '91.201.176.13:8000',
  321. 'HTTP_ORIGIN': 'http://91.201.176.13:8000',
  322. 'HTTP_REFERER': 'http://91.201.176.13:8000/main/user/8/',
  323. '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',
  324. 'PATH_INFO': u'/main/user/8/',
  325. 'QUERY_STRING': '',
  326. 'REMOTE_ADDR': '194.28.62.3',
  327. 'REQUEST_METHOD': 'POST',
  328. 'SCRIPT_NAME': u'',
  329. 'SERVER_NAME': '91.201.176.13',
  330. 'SERVER_PORT': '8000',
  331. 'SERVER_PROTOCOL': 'HTTP/1.1',
  332. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x93a3440>,
  333. 'wsgi.input': <_io.BytesIO object at 0xaece86c>,
  334. 'wsgi.multiprocess': True,
  335. 'wsgi.multithread': False,
  336. 'wsgi.run_once': False,
  337. 'wsgi.url_scheme': 'http',
  338. 'wsgi.version': (1, 0)}>, u'8')
  339. func = <function change_view at 0x9cb3f0c>
  340. kwargs = {'extra_context': {'app': <noc.main.apps.user.views.UserApplication object at 0xa66dd4c>}}
  341. ------------------------------------------------------------------------
  342. File: /opt/noc/contrib/lib/django/utils/decorators.py (Line: 21)
  343. Function: bound_func
  344. 14 """
  345. 15 # 'func' is a function at the time it is passed to _dec, but will eventually
  346. 16 # be a method of the class it is defined it.
  347. 17 def _dec(func):
  348. 18 def _wrapper(self, *args, **kwargs):
  349. 19 @decorator
  350. 20 def bound_func(*args2, **kwargs2):
  351. 21 ==> return func(self, *args2, **kwargs2)
  352. 22 # bound_func has the signature that 'decorator' expects i.e. no
  353. 23 # 'self' argument, but it is a closure over self so it can call
  354. 24 # 'func' correctly.
  355. 25 return bound_func(*args, **kwargs)
  356. 26 # In case 'decorator' adds attributes to the function it decorates, we
  357. 27 # want to copy those. We don't have access to bound_func in this scope,
  358. Variables:
  359. args2 = (<WSGIRequest
  360. path:/main/user/8/,
  361. GET:<QueryDict: {}>,
  362. 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']}>,
  363. COOKIES:{'csrftoken': 'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v',
  364. 'sessionid': 'd453f9f06700041614c8145d059aceb3'},
  365. META:{'CONTENT_LENGTH': '1777',
  366. 'CONTENT_TYPE': 'multipart/form-data; boundary=----WebKitFormBoundaryxUnUKzzoQ144U0aZ',
  367. 'CSRF_COOKIE': 'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v',
  368. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  369. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  370. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU',
  371. 'HTTP_CONNECTION': 'keep-alive',
  372. 'HTTP_COOKIE': 'csrftoken=peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v; sessionid=d453f9f06700041614c8145d059aceb3',
  373. 'HTTP_HOST': '91.201.176.13:8000',
  374. 'HTTP_ORIGIN': 'http://91.201.176.13:8000',
  375. 'HTTP_REFERER': 'http://91.201.176.13:8000/main/user/8/',
  376. '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',
  377. 'PATH_INFO': u'/main/user/8/',
  378. 'QUERY_STRING': '',
  379. 'REMOTE_ADDR': '194.28.62.3',
  380. 'REQUEST_METHOD': 'POST',
  381. 'SCRIPT_NAME': u'',
  382. 'SERVER_NAME': '91.201.176.13',
  383. 'SERVER_PORT': '8000',
  384. 'SERVER_PROTOCOL': 'HTTP/1.1',
  385. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x93a3440>,
  386. 'wsgi.input': <_io.BytesIO object at 0xaece86c>,
  387. 'wsgi.multiprocess': True,
  388. 'wsgi.multithread': False,
  389. 'wsgi.run_once': False,
  390. 'wsgi.url_scheme': 'http',
  391. 'wsgi.version': (1, 0)}>, u'8')
  392. func = <function change_view at 0x9cb3f7c>
  393. self = <noc.main.apps.user.views.UserAdmin object at 0xa66de2c>
  394. kwargs2 = {'extra_context': {'app': <noc.main.apps.user.views.UserApplication object at 0xa66dd4c>}}
  395. ------------------------------------------------------------------------
  396. File: /opt/noc/contrib/lib/django/utils/decorators.py (Line: 91)
  397. Function: _wrapped_view
  398. 84 if result is not None:
  399. 85 return result
  400. 86 if hasattr(middleware, 'process_view'):
  401. 87 result = middleware.process_view(request, view_func, args, kwargs)
  402. 88 if result is not None:
  403. 89 return result
  404. 90 try:
  405. 91 ==> response = view_func(request, *args, **kwargs)
  406. 92 except Exception, e:
  407. 93 if hasattr(middleware, 'process_exception'):
  408. 94 result = middleware.process_exception(request, e)
  409. 95 if result is not None:
  410. 96 return result
  411. 97 raise
  412. Variables:
  413. e = IntegrityError('null value in column "password" violates not-null constraint\n',)
  414. middleware = <django.middleware.csrf.CsrfViewMiddleware object at 0x9ca0eac>
  415. args = (u'8',)
  416. request = <WSGIRequest
  417. path:/main/user/8/,
  418. GET:<QueryDict: {}>,
  419. 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']}>,
  420. COOKIES:{'csrftoken': 'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v',
  421. 'sessionid': 'd453f9f06700041614c8145d059aceb3'},
  422. META:{'CONTENT_LENGTH': '1777',
  423. 'CONTENT_TYPE': 'multipart/form-data; boundary=----WebKitFormBoundaryxUnUKzzoQ144U0aZ',
  424. 'CSRF_COOKIE': 'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v',
  425. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  426. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  427. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU',
  428. 'HTTP_CONNECTION': 'keep-alive',
  429. 'HTTP_COOKIE': 'csrftoken=peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v; sessionid=d453f9f06700041614c8145d059aceb3',
  430. 'HTTP_HOST': '91.201.176.13:8000',
  431. 'HTTP_ORIGIN': 'http://91.201.176.13:8000',
  432. 'HTTP_REFERER': 'http://91.201.176.13:8000/main/user/8/',
  433. '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',
  434. 'PATH_INFO': u'/main/user/8/',
  435. 'QUERY_STRING': '',
  436. 'REMOTE_ADDR': '194.28.62.3',
  437. 'REQUEST_METHOD': 'POST',
  438. 'SCRIPT_NAME': u'',
  439. 'SERVER_NAME': '91.201.176.13',
  440. 'SERVER_PORT': '8000',
  441. 'SERVER_PROTOCOL': 'HTTP/1.1',
  442. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x93a3440>,
  443. 'wsgi.input': <_io.BytesIO object at 0xaece86c>,
  444. 'wsgi.multiprocess': True,
  445. 'wsgi.multithread': False,
  446. 'wsgi.run_once': False,
  447. 'wsgi.url_scheme': 'http',
  448. 'wsgi.version': (1, 0)}>
  449. result = None
  450. kwargs = {'extra_context': {'app': <noc.main.apps.user.views.UserApplication object at 0xa66dd4c>}}
  451. view_func = <function bound_func at 0xae7a64c>
  452. ------------------------------------------------------------------------
  453. File: /opt/noc/contrib/lib/django/utils/decorators.py (Line: 25)
  454. Function: _wrapper
  455. 18 def _wrapper(self, *args, **kwargs):
  456. 19 @decorator
  457. 20 def bound_func(*args2, **kwargs2):
  458. 21 return func(self, *args2, **kwargs2)
  459. 22 # bound_func has the signature that 'decorator' expects i.e. no
  460. 23 # 'self' argument, but it is a closure over self so it can call
  461. 24 # 'func' correctly.
  462. 25 ==> return bound_func(*args, **kwargs)
  463. 26 # In case 'decorator' adds attributes to the function it decorates, we
  464. 27 # want to copy those. We don't have access to bound_func in this scope,
  465. 28 # but we can cheat by using it on a dummy function.
  466. 29 @decorator
  467. 30 def dummy(*args, **kwargs):
  468. 31 pass
  469. Variables:
  470. self = <noc.main.apps.user.views.UserAdmin object at 0xa66de2c>
  471. args = (<WSGIRequest
  472. path:/main/user/8/,
  473. GET:<QueryDict: {}>,
  474. 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']}>,
  475. COOKIES:{'csrftoken': 'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v',
  476. 'sessionid': 'd453f9f06700041614c8145d059aceb3'},
  477. META:{'CONTENT_LENGTH': '1777',
  478. 'CONTENT_TYPE': 'multipart/form-data; boundary=----WebKitFormBoundaryxUnUKzzoQ144U0aZ',
  479. 'CSRF_COOKIE': 'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v',
  480. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  481. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  482. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU',
  483. 'HTTP_CONNECTION': 'keep-alive',
  484. 'HTTP_COOKIE': 'csrftoken=peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v; sessionid=d453f9f06700041614c8145d059aceb3',
  485. 'HTTP_HOST': '91.201.176.13:8000',
  486. 'HTTP_ORIGIN': 'http://91.201.176.13:8000',
  487. 'HTTP_REFERER': 'http://91.201.176.13:8000/main/user/8/',
  488. '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',
  489. 'PATH_INFO': u'/main/user/8/',
  490. 'QUERY_STRING': '',
  491. 'REMOTE_ADDR': '194.28.62.3',
  492. 'REQUEST_METHOD': 'POST',
  493. 'SCRIPT_NAME': u'',
  494. 'SERVER_NAME': '91.201.176.13',
  495. 'SERVER_PORT': '8000',
  496. 'SERVER_PROTOCOL': 'HTTP/1.1',
  497. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x93a3440>,
  498. 'wsgi.input': <_io.BytesIO object at 0xaece86c>,
  499. 'wsgi.multiprocess': True,
  500. 'wsgi.multithread': False,
  501. 'wsgi.run_once': False,
  502. 'wsgi.url_scheme': 'http',
  503. 'wsgi.version': (1, 0)}>, u'8')
  504. bound_func = <function bound_func at 0xae7a8b4>
  505. func = <function change_view at 0x9cb3f7c>
  506. kwargs = {'extra_context': {'app': <noc.main.apps.user.views.UserApplication object at 0xa66dd4c>}}
  507. decorator = <function csrf_protect at 0x9ca872c>
  508. ------------------------------------------------------------------------
  509. File: /opt/noc/lib/app/modelapplication.py (Line: 173)
  510. Function: view_change
  511. 166
  512. 167 @view(url=r"^(\d+)/$", url_name="change", access=HasPerm("change"))
  513. 168 def view_change(self, request, object_id, extra_context=None):
  514. 169 """Display change form"""
  515. 170 return self.admin.change_view(
  516. 171 request,
  517. 172 object_id,
  518. 173 ==> extra_context=self.get_context(extra_context))
  519. 174
  520. 175 ##
  521. 176 ## Backport from ExtApplication/ExtModelApplication for lookup support
  522. 177 ##
  523. 178 ignored_params = ["_dc"]
  524. 179 page_param = "__page"
  525. Variables:
  526. self = <noc.main.apps.user.views.UserApplication object at 0xa66dd4c>
  527. extra_context = None
  528. request = <WSGIRequest
  529. path:/main/user/8/,
  530. GET:<QueryDict: {}>,
  531. 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']}>,
  532. COOKIES:{'csrftoken': 'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v',
  533. 'sessionid': 'd453f9f06700041614c8145d059aceb3'},
  534. META:{'CONTENT_LENGTH': '1777',
  535. 'CONTENT_TYPE': 'multipart/form-data; boundary=----WebKitFormBoundaryxUnUKzzoQ144U0aZ',
  536. 'CSRF_COOKIE': 'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v',
  537. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  538. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  539. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU',
  540. 'HTTP_CONNECTION': 'keep-alive',
  541. 'HTTP_COOKIE': 'csrftoken=peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v; sessionid=d453f9f06700041614c8145d059aceb3',
  542. 'HTTP_HOST': '91.201.176.13:8000',
  543. 'HTTP_ORIGIN': 'http://91.201.176.13:8000',
  544. 'HTTP_REFERER': 'http://91.201.176.13:8000/main/user/8/',
  545. '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',
  546. 'PATH_INFO': u'/main/user/8/',
  547. 'QUERY_STRING': '',
  548. 'REMOTE_ADDR': '194.28.62.3',
  549. 'REQUEST_METHOD': 'POST',
  550. 'SCRIPT_NAME': u'',
  551. 'SERVER_NAME': '91.201.176.13',
  552. 'SERVER_PORT': '8000',
  553. 'SERVER_PROTOCOL': 'HTTP/1.1',
  554. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x93a3440>,
  555. 'wsgi.input': <_io.BytesIO object at 0xaece86c>,
  556. 'wsgi.multiprocess': True,
  557. 'wsgi.multithread': False,
  558. 'wsgi.run_once': False,
  559. 'wsgi.url_scheme': 'http',
  560. 'wsgi.version': (1, 0)}>
  561. object_id = u'8'
  562. ------------------------------------------------------------------------
  563. File: /opt/noc/lib/app/site.py (Line: 232)
  564. Function: inner
  565. 225 for k, v in request.POST.lists())
  566. 226 elif request.method == "GET":
  567. 227 a = dict((k, v[0] if len(v) == 1 else v)
  568. 228 for k, v in request.GET.lists())
  569. 229 logging.debug("API %s %s %s" % (request.method,
  570. 230 request.path, a))
  571. 231 # Call handler
  572. 232 ==> r = v(request, *args, **kwargs)
  573. 233 # Dump SQL statements
  574. 234 if self.log_sql_statements:
  575. 235 from django.db import connections
  576. 236 tsc = 0
  577. 237 sc = defaultdict(int)
  578. 238 for conn in connections.all():
  579. Variables:
  580. args = (u'8',)
  581. 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>>}
  582. Form = <class 'django.forms.forms.Form'>
  583. DictParameter = <class 'noc.sa.interfaces.base.DictParameter'>
  584. self = <noc.lib.app.site.Site object at 0x9bdf92c>
  585. v = <bound method UserApplication.view_change of <noc.main.apps.user.views.UserApplication object at 0xa66dd4c>>
  586. request = <WSGIRequest
  587. path:/main/user/8/,
  588. GET:<QueryDict: {}>,
  589. 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']}>,
  590. COOKIES:{'csrftoken': 'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v',
  591. 'sessionid': 'd453f9f06700041614c8145d059aceb3'},
  592. META:{'CONTENT_LENGTH': '1777',
  593. 'CONTENT_TYPE': 'multipart/form-data; boundary=----WebKitFormBoundaryxUnUKzzoQ144U0aZ',
  594. 'CSRF_COOKIE': 'peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v',
  595. 'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8',
  596. 'HTTP_ACCEPT_ENCODING': 'gzip, deflate',
  597. 'HTTP_ACCEPT_LANGUAGE': 'ru-RU',
  598. 'HTTP_CONNECTION': 'keep-alive',
  599. 'HTTP_COOKIE': 'csrftoken=peFTnEzLFIjk6y5mDgvgKnB9xmmNJd1v; sessionid=d453f9f06700041614c8145d059aceb3',
  600. 'HTTP_HOST': '91.201.176.13:8000',
  601. 'HTTP_ORIGIN': 'http://91.201.176.13:8000',
  602. 'HTTP_REFERER': 'http://91.201.176.13:8000/main/user/8/',
  603. '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',
  604. 'PATH_INFO': u'/main/user/8/',
  605. 'QUERY_STRING': '',
  606. 'REMOTE_ADDR': '194.28.62.3',
  607. 'REQUEST_METHOD': 'POST',
  608. 'SCRIPT_NAME': u'',
  609. 'SERVER_NAME': '91.201.176.13',
  610. 'SERVER_PORT': '8000',
  611. 'SERVER_PROTOCOL': 'HTTP/1.1',
  612. 'wsgi.errors': <open file '/dev/null', mode 'a+' at 0x93a3440>,
  613. 'wsgi.input': <_io.BytesIO object at 0xaece86c>,
  614. 'wsgi.multiprocess': True,
  615. 'wsgi.multithread': False,
  616. 'wsgi.run_once': False,
  617. 'wsgi.url_scheme': 'http',
  618. 'wsgi.version': (1, 0)}>
  619. to_log_api_call = False
  620. InterfaceTypeError = <class 'noc.sa.interfaces.base.InterfaceTypeError'>
  621. PermissionDenied = <class 'noc.lib.app.access.PermissionDenied'>
  622. kwargs = {}
  623. app = <noc.main.apps.user.views.UserApplication object at 0xa66dd4c>
  624. ------------------------------------------------------------------------
  625. END OF TRACEBACK
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement