Skip to content

Commit

Permalink
Make sure we have our filter available
Browse files Browse the repository at this point in the history
  • Loading branch information
mrchrisadams committed Jul 25, 2023
1 parent 7c5b2ac commit 0f5c8ad
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions apps/greencheck/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,11 @@ def provider_country_name(provider) -> str:
else:
return "Unknown"

# we include the filter in our context to allow the template to render
# the filter form, even if we display the results using `ordered_results`
# variable
ctx["filter"] = filter_results

# filter by country, and then within each country, filter by alphabetical order
ordered_results_qs = filter_results.qs.order_by("country", "name")
# now filter the top level country results by written country name
Expand Down

0 comments on commit 0f5c8ad

Please sign in to comment.