Hi,
 
I have just started learning Django (been flip flopping between meteor and 
django, cant decide which to use..) and I am fairly new to web development 
in general.
 
Basically, I have a query where I am using the code "teecolor = 
GolfCourseTees.objects.values('Tee_Color').filter(Course_Name=course)" but 
I want to take the value retrieved form this and use it to make another 
query before loading the template. When I set color1= teecolor[0] color 1 
will show as: {'Tee_Color': u'Blue'}, and I am unsure why this happens. I 
want to retrieve only the value "blue" in this case.
 
The reason for this is each course has usualy 4-5 tee colors. therefore I 
will have color1 = teecolor[0], color 2 = teecolor[1] etc.. so that I can 
insert that into a second query. To do that these values need to be "blue" 
"black" etc
 
Questions:
 
1) What is the data "{'Tee_Color': u'Blue'}" output "{'Tee_Color': 
u'Blue'}" called and why does it display like this (I would like to 
understand and not just insert a given line of code)? I have read the 
documentation and I am still confused on this. 
2) How can I retrieve blue from {'Tee_Color': u'Blue'}? (example code would 
be helpful)
Brendan
 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2d92f660-db45-4c23-9525-f6f42fac5bca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to