On Tue, May 27, 2008 at 07:27:27PM +0200, Tomás Garzón Hervás wrote:
> Servicio.objects.all().values('trabajadores')
> I get the exception:
> <class 'django.core.exceptions.FieldError'>: Invalid field name:
> 'trabajadores'
If I remeber correctly you should be using the related_name here.
> Trabajador.objects.all().values('user')
> Django get me a list of user id, but not get me the user objects, why?
Try reading http://www.djangoproject.com/documentation/db-api/#values-fields
the page clearly states the behavior of the values function.
Again this is a question for the user list :) In most cases your better of
asking the -user list first.
-Thomas
--
mvh
Thomas Kongevold Adamcik
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django developers" 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-developers?hl=en
-~----------~----~----~----~------~----~------~--~---