On Mon, Mar 9, 2009 at 12:03 PM, NoviceSortOf <dljonsson2...@gmail.com> wrote:
>
>
> On the command line I'm unable to get a coherent return on my data
> object filters or fetches,
>
> Instead of getting any detail I get a dictionary with nothing but the
> words UserProfile,
> UserProfile object where Field name and value should be.
>
> ie.
>
>>>>g = UserProfile.objects.filter(email = "dljonsson2...@gmail.com")
>  [<UserProfile: UserProfile object>, <UserProfile: UserProfile
> object>]
>
> instead of something like
>
>>>>g = UserProfile.objects.filter(email = "dljonsson2...@gmail.com")
> [username : DLJ99, email : "dljonsson2...@gmail.com]
>
> other tables as well in the database have the same behavior, others do
> not.

This might be related to these models haveing or not a __unicode__ method.
See

http://docs.djangoproject.com/en/dev/intro/tutorial01/#playing-with-the-api

and

http://docs.djangoproject.com/en/dev/ref/models/instances/#django.db.models.Model.__unicode__

>
> my production server does not seem to have a problem with this, but
> development server does. i've double checked model and postgres sql
> server stuctures.
>
> Any clues why my development server fetches and filters will not
> return coherent
> data?
>

It's not cleat to me what does the development server have to do with this.
Could you explaining it a bit further.

-- 
Ramiro Morales
http://rmorales.net

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