On 03/15/2012 11:22 PM, Murilo Vicentini wrote:
Uhmmm, thank you a lot. That was what I was looking for! Sorry for wasting your time. One last question, does this double-underscore notation work at my html template? Because after filtering I will want to display the information of the different models at one row of my table.


Try it and find out. ^_^

Also, a word of caution for things like that -- they lead to amazingly slow pages. Make sure you read up on select_related before you go crazy referring to related items in your templates (or views, for that matter).

https://docs.djangoproject.com/en/1.3/ref/models/querysets/#select-related

I suggest ignoring the "depth" kwarg and using the method demonstrated with "room__building" as an example. But read the preceding text first to understand how it works in general.


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