Wiadomość napisana w dniu 2008-08-27, o godz. 07:25, przez Vance  
Dubberly:

> So I want to do something I'd think would be extremely common and  
> simple.
>
> user = User.objects.get(pk=data['id'])
>
> I want a dictionary of the model attributes/values from user.
>
> user_dict = { 'first_name' : 'foo', ......
>
> Am I asking to much or reading to little?


You can see at user.__dict__. This is standard Python feature of class  
instances.

-- 
We read Knuth so you don't have to. - Tim Peters

Jarek Zgoda, R&D, Redefine
[EMAIL PROTECTED]


--~--~---------~--~----~------------~-------~--~----~
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 [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to