class UniversityListView(ListView):
...
def get_queryset(self):
university = University.objects.filter(city='London')
return university
class University(models.Model):
...
city = models.ForeignKey('City')
...
class UniversityListView(ListView):
...
def get_queryset(self):
city = City.objects.get(name='London')
university = University.objects.filter(city=city)
return university