Skip to content

Commit

Permalink
Merge pull request #2778 from GeotrekCE/order_sites_filter
Browse files Browse the repository at this point in the history
Order Sites by name in filter for Courses list
  • Loading branch information
Chatewgne committed Oct 1, 2021
2 parents 2899807 + f05e38d commit 284c4de
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions geotrek/outdoor/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ class CourseFilterSet(ZoningFilterSet, StructureRelatedFilterSet):
label=_("Orientation"))
wind = MultipleChoiceFilter(choices=Site.WIND_CHOICES, method='filter_orientation',
label=_("Wind"))
site = ModelMultipleChoiceFilter(queryset=Site.objects.only('name').order_by('name'))

class Meta(StructureRelatedFilterSet.Meta):
model = Course
Expand Down

0 comments on commit 284c4de

Please sign in to comment.