On Tue, 2009-02-03 at 08:08 -0800, Theme Park Photo, LLC wrote:
> 
> Ok! NOW I get it! You need to do a get to do a select by primary key
> 
> 
>  u=User.objects.get(username="swirsky")
> 
> 
> For some reason I thought that you could get by primary key by just
> creating the object with the key specified...

Your first version of the code was creating a Python instance. No
interaction with the database. Your new version specifically asks the
database for information.

Malcolm



--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to