Sort lists

This commit is contained in:
Kevin Alberts 2018-03-06 15:12:46 +01:00
parent c6d970e4a7
commit 1e72794051

View file

@ -8,12 +8,14 @@ from dronken.models import City, Association
class CityList(ListView):
template_name = 'cities.html'
model = City
ordering = ['name']
class AssociationList(ListView):
template_name = 'associations.html'
model = Association
city = None
ordering = ['short_name']
def get_queryset(self):
self.city = City.objects.get(slug=self.kwargs['city'])