On Sat, Mar 14, 2009 at 6:47 AM, timc3 <t...@timc3.com> wrote:

>
>  > > So is that the list that you are talking about?
> >
> > I'm assuming those values corropond tot he fields on the model, any
> reason
> > you can't do:
> >
> > self.model(**cursor.fetchone())
>
>
> Just tried to do that but it seems to be returning things as a tuple
> so I get the error:
>
> ModelBase object argument after ** must be a dictionary
>
> So I guess I have to convert it to a dictionary?
>
> >
>
No, you need to do *cursor.fetchone() which automatically turns a tuple into
arguments, for some reason I thought you had a dict there.

Alex

-- 
"I disapprove of what you say, but I will defend to the death your right to
say it." --Voltaire
"The people's good is the highest law."--Cicero

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