Sort by code #336
Sort by code
#336
-
Hey! I output to a table a model where one of the fields is CountryField (). I display the name of the country and the code. How can I sort by country code? |
Beta Was this translation helpful? Give feedback.
Answered by
SmileyChris
Feb 23, 2021
Replies: 1 comment
-
Something like |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
SmileyChris
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Something like
your_field.choices = sorted(your_field.choices)
should work I'd guess