Re: Object list with values to ForeignKey and ManyToMany

2008-05-27 Thread Thomas K. Adamcik
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: > : Invalid field name: > 'trabajadores' If I remeber correctly you should be using the related_name here. > Trabajador.objects.all().values('user'

Re: Object list with values to ForeignKey and ManyToMany

2008-05-27 Thread Tomás Garzón Hervás
OK, but i think that is a bug of Django API model, because it not get me correct response. Collin Grady escribió: > Usage questions such as this should go to the django-users mailing list. The > django-developers list is for the development of django itself, not just for > developers who use dj

Re: Object list with values to ForeignKey and ManyToMany

2008-05-27 Thread Collin Grady
Usage questions such as this should go to the django-users mailing list. The django-developers list is for the development of django itself, not just for developers who use django. -- Collin Grady Some people live life in the fast lane. You're in oncoming traffic. --~--~-~--~~--

Object list with values to ForeignKey and ManyToMany

2008-05-27 Thread Tomás Garzón Hervás
Hi, I need help, thanks . My first problem with values: class Servicio(models.Model): empresa = models.ForeignKey(Empresa,blank=True,null=True,related_name='servicios_internos') [EMAIL PROTECTED] Trabajadores trabajadores = models.ManyToManyField(Trabajador, blank=True,null