i have made some modification to my code but still it is not working.
before saving the new_data to the new_user, i am setting to it the
person id. as follows:
if not errors:
manipulator.do_html2python(new_data)
new_data['persons_id'] = person_id
new_user = manipulator.save(new_data)
in the trace back i can see that the the new_data has the persons_id.
but there is still an error.
here is the error:
Traceback (most recent call last):
File
"e:\python24\lib\site-packages\django-0.95-py2.4.egg\django\core\handlers\base.py"
in get_response
74. response = callback(request, *callback_args, **callback_kwargs)
File "E:\Documents and Settings\Ahmad
Atwi\Desktop\training\sag\..\sag\training\views.py" in create_user
42. new_user = manipulator.save(new_data)
File
"e:\python24\lib\site-packages\django-0.95-py2.4.egg\django\db\models\manipulators.py"
in save
101. new_object.save()
File
"e:\python24\lib\site-packages\django-0.95-py2.4.egg\django\db\models\base.py"
in save
195. ','.join(placeholders)), db_values)
File
"e:\python24\lib\site-packages\django-0.95-py2.4.egg\django\db\backends\util.py"
in execute
12. return self.cursor.execute(sql, params)
File
"e:\python24\lib\site-packages\django-0.95-py2.4.egg\django\db\backends\mysql\base.py"
in execute
35. return self.cursor.execute(sql, params)
File "E:\Python24\lib\site-packages\MySQLdb\cursors.py" in execute
163. self.errorhandler(self, exc, value)
File "E:\Python24\lib\site-packages\MySQLdb\connections.py" in
defaulterrorhandler
35. raise errorclass, errorvalue
OperationalError at /admin/createUser/39/
(1048, "Column 'persons_id' cannot be null")
Thanks in advance
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---