Skip to content

Commit

Permalink
order council list by name
Browse files Browse the repository at this point in the history
update to django3 means it doesn't default to order things were put in
the database so set an explicit order. This only seems to matter if you
do a complete rebuild.
  • Loading branch information
struan committed Oct 18, 2021
1 parent 5c61e26 commit 240d970
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion caps/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ class CouncilListView(FilterView):
template_name = 'council_list.html'

def get_queryset(self):
return Council.objects.annotate(num_plans=Count('plandocument'))
return Council.objects.annotate(num_plans=Count('plandocument')).order_by('name')

class SearchResultsView(HaystackSearchView):

Expand Down

0 comments on commit 240d970

Please sign in to comment.