Re: Query with 3 models

2012-07-19 Thread Julio Galvez
That works awesome!!. I'm new in this, and I don't know many things about how works django. Thanks all for help me El jueves, 19 de julio de 2012 15:07:44 UTC-5, Tomas Neme escribió: > > > Thanks, the first example is exactly that i want. I try it in the Django > > Shell and it works, but; How

Re: Query with 3 models

2012-07-19 Thread Julio Galvez
Thanks, the first example is exactly that i want. I try it in the Django Shell and it works, but; How I show the results in the template? Maybe I'm wrong, but I try to pass like { 'empresas': Empresa.objects.all().select_related() } ,and only can show the 'Empresa' attributes on the loop. I

Query with 3 models

2012-07-19 Thread Julio Galvez
Hi, I'm new with Django and in this Groups; I have the next models and question class Empresa(models.Model): usuario = models.ForeignKey(User) empresa = models.CharField(max_length=100, unique=True) slogan = models.TextField() logotipo = models.ImageField(upload_to='logos') descripcion = models.