Expose name scheme over the settings API, including details for device clients

This commit is contained in:
Raphael Michel
2022-07-27 11:12:58 +02:00
parent d7922571e7
commit 8a8171bd24
2 changed files with 32 additions and 2 deletions

View File

@@ -2594,7 +2594,9 @@ Your {organizer} team"""))
},
'name_scheme': {
'default': 'full', # default for new events is 'given_family'
'type': str
'type': str,
'serializer_class': serializers.ChoiceField,
'serializer_kwargs': {},
},
'giftcard_length': {
'default': settings.ENTROPY['giftcard_secret'],
@@ -2989,6 +2991,9 @@ PERSON_NAME_SCHEMES = OrderedDict([
},
}),
])
DEFAULTS['name_scheme']['serializer_kwargs']['choices'] = ((k, k) for k in PERSON_NAME_SCHEMES)
COUNTRIES_WITH_STATE_IN_ADDRESS = {
# Source: http://www.bitboost.com/ref/international-address-formats.html
# This is not a list of countries that *have* states, this is a list of countries where states