Sort lists
This commit is contained in:
		
							parent
							
								
									c6d970e4a7
								
							
						
					
					
						commit
						1e72794051
					
				
					 1 changed files with 2 additions and 0 deletions
				
			
		| 
						 | 
				
			
			@ -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…
	
	Add table
		Add a link
		
	
		Reference in a new issue