IntegrityError at accounts registration 1048 Column user_id cannot be

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
IntegrityError at /accounts/registration/
(1048, "Column 'user_id' cannot be null")Request Method: POST
Request URL: http://localhost:8000/accounts/registration/
Exception Type: IntegrityError
Exception Value: (1048, "Column 'user_id' cannot be null")
Exception Location: C:\Python25\Lib\site-packages\django\db\backends\mysql\base.py in execute, line 88
Python Executable: C:\Python25\python.exe
Python Version: 2.5.2
Python Path: ['E:\\my_project\\django\\koval_magazine', 'C:\\WINDOWS\\system32\\python25.zip', 'C:\\Python25\\DLLs', 'C:\\Python25\\lib', 'C:\\Python25\\lib\\plat-win', 'C:\\Python25\\lib\\lib-tk', 'C:\\Python25', 'C:\\Python25\\lib\\site-packages', 'C:\\Python25\\lib\\site-packages\\PIL']
Server time: Втор, 9 Дек 2008 23:38:08 +0300
Traceback Switch to copy-and-paste view
C:\Python25\Lib\site-packages\django\core\handlers\base.py in get_response
...
response = callback(request, *callback_args, **callback_kwargs) ...
▶ Local vars
E:\my_project\django\koval_magazine\accounts\views.py in reg_user
...
form2.save() ...
▶ Local vars
C:\Python25\Lib\site-packages\django\forms\models.py in save
...
return save_instance(self, self.instance, self._meta.fields, fail_message, commit) ...
▶ Local vars
C:\Python25\Lib\site-packages\django\forms\models.py in save_instance
...
instance.save() ...
▶ Local vars
C:\Python25\Lib\site-packages\django\db\models\base.py in save
...
self.save_base(force_insert=force_insert, force_update=force_update) ...
▶ Local vars
C:\Python25\Lib\site-packages\django\db\models\base.py in save_base
...
result = manager._insert(values, return_id=update_pk) ...
▶ Local vars
C:\Python25\Lib\site-packages\django\db\models\manager.py in _insert
...
return insert_query(self.model, values, **kwargs) ...
▶ Local vars
C:\Python25\Lib\site-packages\django\db\models\query.py in insert_query
...
return query.execute_sql(return_id) ...
▶ Local vars
C:\Python25\Lib\site-packages\django\db\models\sql\subqueries.py in execute_sql
...
cursor = super(InsertQuery, self).execute_sql(None) ...
▶ Local vars
C:\Python25\Lib\site-packages\django\db\models\sql\query.py in execute_sql
...
cursor.execute(sql, params) ...
▶ Local vars
C:\Python25\Lib\site-packages\django\db\backends\util.py in execute
...
return self.cursor.execute(sql, params) ...
▶ Local vars
C:\Python25\Lib\site-packages\django\db\backends\mysql\base.py in execute
...
raise Database.IntegrityError(tuple(e)) ...
▶ Local vars
Request information
GET
No GET data
POSTVariable Value
username u'gigimon4ik22254'
password1 u'123456'
password2 u'123456'
reg_address u'fdsf df sdf s'
fact_address u'dsf sdf ewr'
contact_face u'wert'
urid_address u'fdsf sdf sdf'
time_work u'sdf f sdf\r\nfsd fsd fwer'
visit_day u'We'
phone_number u'3456'
email u'aliens@mail.ru'
COOKIES
No cookie data
METAVariable Value
ALLUSERSPROFILE 'C:\\Documents and Settings\\All Users'
APPDATA 'C:\\Documents and Settings\\\xc0\xe4\xec\xe8\xed\xe8\xf1\xf2\xf0\xe0\xf2\xee\xf0\\Application Data'
CLIENTNAME 'Console'
COMMONPROGRAMFILES 'C:\\Program Files\\Common Files'
COMPUTERNAME 'COMP'
COMSPEC 'C:\\WINDOWS\\system32\\cmd.exe'
CONTENT_LENGTH '245'
CONTENT_TYPE 'application/x-www-form-urlencoded'
DJANGO_SETTINGS_MODULE 'koval_magazine.settings'
FP_NO_HOST_CHECK 'NO'
GATEWAY_INTERFACE 'CGI/1.1'
HOMEDRIVE 'C:'
HOMEPATH '\\Documents and Settings\\\xc0\xe4\xec\xe8\xed\xe8\xf1\xf2\xf0\xe0\xf2\xee\xf0'
HTTP_ACCEPT 'text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1'
HTTP_ACCEPT_CHARSET 'iso-8859-1, utf-8, utf-16, *;q=0.1'
HTTP_ACCEPT_ENCODING 'deflate, gzip, x-gzip, identity, *;q=0'
HTTP_ACCEPT_LANGUAGE 'ru-RU,ru;q=0.9,en;q=0.8'
HTTP_CONNECTION 'Keep-Alive, TE'
HTTP_HOST 'localhost:8000'
HTTP_REFERER 'http://localhost:8000/accounts/registration/'
HTTP_TE 'deflate, gzip, chunked, identity, trailers'
HTTP_USER_AGENT 'Opera/9.62 (Windows NT 5.1; U; ru) Presto/2.1.1'
LOGONSERVER '\\\\COMP'
NUMBER_OF_PROCESSORS '2'
OS 'Windows_NT'
PATH 'C:\\WINDOWS\\system32;C:\\WINDOWS;C:\\WINDOWS\\System32\\Wbem;C:\\Program Files\\Mercurial;C:\\Python25\\;C:\\Program Files\\OpenVPN\\bin'
PATHEXT '.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH'
PATH_INFO u'/accounts/registration/'
PROCESSOR_ARCHITECTURE 'x86'
PROCESSOR_IDENTIFIER 'x86 Family 15 Model 107 Stepping 2, AuthenticAMD'
PROCESSOR_LEVEL '15'
PROCESSOR_REVISION '6b02'
PROGRAMFILES 'C:\\Program Files'
PROMPT '$P$G'
QUERY_STRING ''
REMOTE_ADDR '127.0.0.1'
REMOTE_HOST ''
REQUEST_METHOD 'POST'
RUN_MAIN 'true'
SCRIPT_NAME u''
SERVER_NAME 'localhost'
SERVER_PORT '8000'
SERVER_PROTOCOL 'HTTP/1.1'
SERVER_SOFTWARE 'WSGIServer/0.1 Python/2.5.2'
SESSIONNAME 'Console'
SYSTEMDRIVE 'C:'
SYSTEMROOT 'C:\\WINDOWS'
TEMP 'C:\\DOCUME~1\\9335~1\\LOCALS~1\\Temp'
TMP 'C:\\DOCUME~1\\9335~1\\LOCALS~1\\Temp'
USERDOMAIN 'COMP'
USERNAME '\xc0\xe4\xec\xe8\xed\xe8\xf1\xf2\xf0\xe0\xf2\xee\xf0'
USERPROFILE 'C:\\Documents and Settings\\\xc0\xe4\xec\xe8\xed\xe8\xf1\xf2\xf0\xe0\xf2\xee\xf0'
WINDIR 'C:\\WINDOWS'
wsgi.errors <open file '<stderr>', mode 'w' at 0x00A1F0B0>
wsgi.file_wrapper <class 'django.core.servers.basehttp.FileWrapper'>
wsgi.input <socket._fileobject object at 0x0177E070>
wsgi.multiprocess False
wsgi.multithread True
wsgi.run_once False
wsgi.url_scheme 'http'
wsgi.version (1, 0)