More information...

I stuck the following into my code at the same place the other code is
bombing. I did this just to make sure that I wasn't getting anything
weird in the dictionary here that I wasn't getting in the command
line.

mydict = {'city': u'Columbus', 'first_name': u'Miles', 'last_name':
u'Yeung', 'school': import_object_dict['school'], 'zip': 43215.0,
'title': u'Mr.', 'dob': '1956-12-29', 'phone_primary':
u'614-468-5940', 'state': u'OH', 'address': u'142, Quilly Lane',
'type': u'Student', 'email': u'miles.l.ye...@spambob.com'}

new_object = Student(**mydict)

Same exact error as before. It's almost as if the Student object is
behaving differently within the context that it does within manage.py
shell.

Just in case it was the school that was causing the issue above
(doubtful but good to rule it out) I tried the above WITHOUT the
school entry in the dictionary with the same results.

Still stuck.....

Keyton


On Jan 21, 8:13 am, Keyton Weissinger <key...@gmail.com> wrote:
> Oh, and I have printed the import_object_dict, it has exactly what I
> think it should... Argh!
>
> ;-)
>
> K
>
> On Jan 21, 12:12 am, Martin Conte Mac Donell <refl...@gmail.com>
> wrote:
>
> > On Wed, Jan 21, 2009 at 2:35 AM, Keyton Weissinger <key...@gmail.com> wrote:
>
> > > Oh and just to re-state, this exact same code works like a champ on
> > > import of School or Parent data (neither of which have a ManyToMany
> > > field).
>
> > > Keyton
>
> > I can't reproduce this exception. Try to print import_object_dict just
> > before "new_object =
> > model_import_info.model_for_import.objects.create(**import_object_dict)".
>
> > > Note that I am NOT yet trying to SAVE the Student object, just 
> > > instantiate it.
>
> > Actually Model.objects.create() do try to save() object. If you don't
> > want it, call Model(**import_object_dict)
>
> > M.
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to