Sort lists
This commit is contained in:
parent
c6d970e4a7
commit
1e72794051
|
@ -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'])
|
||||
|
|
Loading…
Reference in a new issue