Skip to content

Commit

Permalink
#1219: Sort example CSV update fields in import template
Browse files Browse the repository at this point in the history
in alphabetical order.
  • Loading branch information
susanodd committed Apr 22, 2024
1 parent 49f5583 commit 29a7113
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions signbank/csv_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -1151,16 +1151,16 @@ def choice_fields_choices():
for f in fields:
if hasattr(f, 'field_choice_category'):
fields_choices[f.verbose_name.encode('ascii', 'ignore').decode()] = \
[fc.name for fc in FieldChoice.objects.filter(field__iexact=f.field_choice_category)]
[fc.name for fc in FieldChoice.objects.filter(field__iexact=f.field_choice_category).order_by('name')]
elif f.name in ['domhndsh', 'subhndsh']:
fields_choices[f.verbose_name.encode('ascii', 'ignore').decode()] = \
[hs.name for hs in Handshape.objects.all()]
[hs.name for hs in Handshape.objects.all().order_by('name')]
elif f.name == 'semField':
fields_choices[f.verbose_name.encode('ascii', 'ignore').decode()] = \
[sf.name for sf in SemanticField.objects.all()]
[sf.name for sf in SemanticField.objects.all().order_by('name')]
elif f.name == 'derivHist':
fields_choices[f.verbose_name.encode('ascii', 'ignore').decode()] = \
[dh.name for dh in DerivationHistory.objects.all()]
[dh.name for dh in DerivationHistory.objects.all().order_by('name')]
elif f.name in ['repeat', 'altern',
'domhndsh_letter', 'domhndsh_number',
'subhndsh_letter', 'subhndsh_number',
Expand Down

0 comments on commit 29a7113

Please sign in to comment.