On 06-12-11 21:11, wgis wrote:
I get
(Carrots, Flavor,2.0)

I want to list all the contexts in the "Carrot template", withou
having to search and merge the ones missing.
So if the result was

(Carrots, Flavour, 2.0)
(Carrots, Smell, 0.0)
(Carrots, Usability, 0.0)
(Carrots, Size, 0.0)
or
(Carrots, Flavour, 2.0)
(Carrots, Smell, null)
(Carrots, Usability, null)
(Carrots, Size, null)

Ah! Now I get your point. You also want the "empty" results for which there's no SQL data. Sorry, but I don't see a way in which you can do that with an SQL query (and so also not with a Django query).

In case you want all contexts, you'll have to query for those specifically. And afterwards grab the results belonging to that context. So you won't escape a for loop and some manual work, I'm afraid.


Reinout

--
Reinout van Rees                    http://reinout.vanrees.org/
rein...@vanrees.org             http://www.nelen-schuurmans.nl/
"If you're not sure what to do, make something. -- Paul Graham"

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