I am trying to create a website where you can view different "ranks" and the people within them. I have gotten it to create the ranks into there own Collapsable Panels, as I am using Bootstrap 3, but I am unable to list the Users who have that rank. Please help.

```
#team.html template
<div class="container">
 <div class="col-md-2">
  <div class="panel-group" id="accordion">
    {% for rank in Rank_list %}
    <div class="panel panel-default">
      <div class="panel-heading">
        <h4 class="panel-title">
          <a data-toggle="collapse" data-parent="#accordion" href="#collapse{{rank.rank_num}}">
            {{ rank.rank_name }}s
          </a>
        </h4>
      </div>
      <div id="collapse{{rank.rank_num}}" class="panel-collapse collapse in">
        <div class="panel-body">
          {% for name in User_list %}
            <li>
              <p>{{name}}</p>
              </li>
          {% endfor %}
        </div>
      </div>
    </div>
    {% endfor %}
  </div>
</div>

```

```
#views.py
class team(generic.ListView):
 template_name = 'main/team.html'
 context_object_name = 'Rank_list'
 context_object_name2 = 'User_list'

 def get_queryset(self):
    return Rank.objects.order_by('rank_num')
 def get_queryset2(self):
    return User.objects.order_by('name')

#models.py
class Rank(models.Model):
    rank_name = models.CharField(max_length=200)
    rank_num = models.IntegerField(default=0)
    def __str__(self):              # __unicode__ on Python 2
        return self.rank_name

class User(models.Model):
    rank = models.ForeignKey(Rank)
    name = models.CharField(max_length=200)
    def __str__(self):              # __unicode__ on Python 2
        return self.name

```