Puoi semplicemente aggiungere una nuova queryyset al contesto:
def get_context_data(self, **kwargs):
context = super(StateListView, self).get_context_data(**kwargs)
context.update({'state': self.kwargs['location_state']})
context['schools_highschool'] = context['schools_by_state'].filter(grades='9-12')
return context
Quindi loop schools_highschool
nel modello. Penso che anche il tuo modello sia un po 'fuori. Forse fallo:
{% extends 'base.html' %}
{% block content %}
<h2>{{ state }}</h2> #This works and shows the state based on the URL
<div class="row">
<div class="col-12 col-sm-12 col-lg-12">
<ul class="nav nav-tabs" id="myTab">
<li class="active"><a href="#all">All</a></li>
<li><a href="#high">High School</a></li>
</ul>
</div>
<div id="content" class="tab-content">
<div class="tab-pane active" id="all">
<ul>
{% for school in schools_by_state %}
<li>{{ school.school_name }}</li>
{% endfor %}
</ul>
</div>
<div class="tab-pane" id="high">
<ul>
{% for school in schools_highschool %}
<li>{{ school.school_name }}</li>
{% endfor %}
</ul>
</div>
</div><!-- end content -->
</div><!-- end row -->
{% endblock content %}