Projet

Général

Profil

0002-settings-add-supported-phone-country-codes-70486.patch

Paul Marillonnet, 19 octobre 2022 17:10

Télécharger (1,38 ko)

Voir les différences:

Subject: [PATCH 2/4] settings: add supported phone country codes (#70486)

 src/authentic2/settings.py | 14 ++++++++++++++
 1 file changed, 14 insertions(+)
src/authentic2/settings.py
20 20

  
21 21
# Load default from Django
22 22
from django.conf import global_settings
23
from django.utils.translation import gettext_lazy as _
23 24

  
24 25
from . import logger, plugins
25 26

  
......
372 373
SELECT2_JS = '/static/xstatic/select2.min.js'
373 374
SELECT2_CSS = '/static/xstatic/select2.min.css'
374 375

  
376
# Phone prefixes by country for phone number as authentication identifier
377
PHONE_COUNTRY_CODES = {
378
    '32': {'lang': 'BE', 'area': _('Belgium')},
379
    '33': {'lang': 'FR', 'area': _('Metropolitan France')},
380
    '262': {'lang': 'FR', 'area': _('Réunion')},
381
    '508': {'lang': 'FR', 'area': _('Saint Pierre and Miquelon')},
382
    '590': {'lang': 'FR', 'area': _('Guadeloupe')},
383
    '594': {'lang': 'FR', 'area': _('French Guiana')},
384
    '596': {'lang': 'FR', 'area': _('Martinique')},
385
}
386

  
387
DEFAULT_COUNTRY_CODE = '33'
388

  
375 389
#
376 390
# Load configuration file
377 391
#
378
-