Re: Query with 3 models
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 do something like this
{% for a in empresa%}
a.slogan
a.descripcion
a.platillo.fotografia
{% endfor %}
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/irPqWuQNQt0J.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home