I didn't really know how to label this question, but I think it's an 
interesting concept and I haven't seen a resolution anywhere else.

I currently have two different dictionaries as context for a template:

Enter code here...context ={
                             'person':person,
                             'scores':scores,
                           }


Each of these dictionaries has a common key (person.Number), 
(scores.Number), however the person dictionary is based off of a model in 
my django database, while scores comes from a json feed that I parse 
through:

I currently run through a table in a template that looks like this:

Enter code here...<table class="table">
  <thead>
  <tr>
  <th>Person</th>
<th>Person Number</th>
<th>First Name</th>
<th>Last Name </th>
<th> City </th> 
<th> Score</th> 
  </tr>
  </thead>
  <tbody>
                       {% for person in persons %}
                                      <tr>
                                      <td>{{ person.Number }}</td>
                                      <td>{{ person.firstName }}</td>
                                                                      
<td>{{ person.lastName }}</td>
                                                                      
<td>{{ person.city }}</td>
                                                                      
<td>??'''scores.score1 goes here'''</td>
 
                     {% endfor %}
    
  </table>

What I'm trying to figure out to do is figure out how to get that final 
detail loaded into the table where we would find the score specific to that 
person.Number.  In other words how to go through my scores dictionary in 
this template and find the corresponding score1 using the person.Number 
from the other dictionary as the value.


Let me know if you have any ideas.

Thanks.


-- 
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 https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/d05c8fc4-706b-422b-bc11-b656f1950dea%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to