I've exported some old data, in an old (somewhat terrible) format as  
XML, and I'm trying to read it back in and populate a Django model.

When I try to save an object, however, I get this error:

   File "/Users/tobryan1/Documents/eclipse/workspace/django-projects/ 
dmi_mr/../dmi_mr/load_questions.py", line 34, in load_questions
     dbq.save()
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ 
python2.4/site-packages/Django-0.91-py2.4.egg/django/db/models/ 
base.py", line 158, in save
     pk_val = self._get_pk_val()
   File "/Library/Frameworks/Python.framework/Versions/2.4/lib/ 
python2.4/site-packages/Django-0.91-py2.4.egg/django/db/models/ 
base.py", line 76, in _get_pk_val
     return getattr(self, self._meta.pk.attname)
AttributeError: 'Question' object has no attribute 'id'

Isn't the model supposed to assign the id, or do I have to do that  
myself?

Todd

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to