forked from CGM_Public/pretix_original
Invoice addresses: Ask for a state in some countries (#1362)
* Invoice addresses: Ask for a state in some countries * API, tests, noscript * Fix shredder tests * Add test for addresses with long state names
This commit is contained in:
@@ -880,6 +880,19 @@ PERSON_NAME_SCHEMES = OrderedDict([
|
||||
},
|
||||
}),
|
||||
])
|
||||
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
|
||||
# are actually *used* in postal addresses. This is obviously not complete and opinionated.
|
||||
# Country: [(List of subdivision types as defined by pycountry), (short or long form to be used)]
|
||||
'AU': (['State', 'Territory'], 'short'),
|
||||
'BR': (['State'], 'short'),
|
||||
'CA': (['Province', 'Territory'], 'short'),
|
||||
'CN': (['Province', 'Autonomous region', 'Munincipality'], 'long'),
|
||||
'MY': (['State'], 'long'),
|
||||
'MX': (['State', 'Federal District'], 'short'),
|
||||
'US': (['State', 'Outlying area', 'District'], 'short'),
|
||||
}
|
||||
|
||||
|
||||
settings_hierarkey = Hierarkey(attribute_name='settings')
|
||||
|
||||
Reference in New Issue
Block a user