France (fr)

Forms

FR-specific Form helpers

class localflavor.fr.forms.FRDepartmentField(*args, **kwargs)[source]

A Select Field that uses a FRDepartmentSelect widget.

widget

alias of FRDepartmentSelect

class localflavor.fr.forms.FRDepartmentSelect(attrs=None)[source]

A Select widget that uses a list of FR departments as its choices.

class localflavor.fr.forms.FRNationalIdentificationNumber(*args, **kwargs)[source]

Validates input as a French National Identification number.

Validation of the Number, and checksum calculation is detailed at http://en.wikipedia.org/wiki/INSEE_code

New in version 1.1.

class localflavor.fr.forms.FRPhoneNumberField(*args, **kwargs)[source]

Validate local French phone number (not international ones).

The correct format is ‘0X XX XX XX XX’. ‘0X.XX.XX.XX.XX’ and ‘0XXXXXXXXX’ validate but are corrected to ‘0X XX XX XX XX’.

Deprecated since version 1.4: Use the django-phonenumber-field library instead.

class localflavor.fr.forms.FRRegion2016Select(attrs=None)[source]

A Select widget that uses a list of France’s New Regions as its choices.

class localflavor.fr.forms.FRRegionField(*args, **kwargs)[source]

A Select Field that uses a FRRegionSelect widget.

widget

alias of FRRegionSelect

class localflavor.fr.forms.FRRegionSelect(attrs=None)[source]

A Select widget that uses a list of FR Regions as its choices.

class localflavor.fr.forms.FRSIRENField(*args, **kwargs)[source]

SIREN stands for “Système d’identification du répertoire des entreprises”.

It’s under authority of the INSEE. See http://fr.wikipedia.org/wiki/Système_d’identification_du_répertoire_des_entreprises for more information.

New in version 1.1.

class localflavor.fr.forms.FRSIRETField(*args, **kwargs)[source]

SIRET stands for “Système d’identification du répertoire des établissements”.

It’s under authority of the INSEE. See http://fr.wikipedia.org/wiki/Système_d’identification_du_répertoire_des_établissements for more information.

New in version 1.1.

class localflavor.fr.forms.FRZipCodeField(*args, **kwargs)[source]

Validate local French zip code.

The correct format is ‘XXXXX’.

Data

localflavor.fr.fr_department.DEPARTMENT_CHOICES_PER_REGION = (('01', 'Ain', '82'), ('02', 'Aisne', '22'), ('03', 'Allier', '83'), ('04', 'Alpes-de-Haute-Provence', '93'), ('05', 'Hautes-Alpes', '93'), ('06', 'Alpes-Maritimes', '93'), ('07', 'Ardèche', '82'), ('08', 'Ardennes', '21'), ('09', 'Ariège', '73'), ('10', 'Aube', '21'), ('11', 'Aude', '91'), ('12', 'Aveyron', '73'), ('13', 'Bouches-du-Rhône', '93'), ('14', 'Calvados', '25'), ('15', 'Cantal', '83'), ('16', 'Charente', '54'), ('17', 'Charente-Maritime', '54'), ('18', 'Cher', '24'), ('19', 'Corrèze', '74'), ('2A', 'Corse-du-Sud', '94'), ('2B', 'Haute-Corse', '94'), ('21', "Côte-d'Or", '26'), ('22', "Côtes-d'Armor", '53'), ('23', 'Creuse', '74'), ('24', 'Dordogne', '72'), ('25', 'Doubs', '43'), ('26', 'Drôme', '82'), ('27', 'Eure', '23'), ('28', 'Eure-et-Loir', '24'), ('29', 'Finistère', '53'), ('30', 'Gard', '91'), ('31', 'Haute-Garonne', '73'), ('32', 'Gers', '73'), ('33', 'Gironde', '72'), ('34', 'Hérault', '91'), ('35', 'Ille-et-Vilaine', '53'), ('36', 'Indre', '24'), ('37', 'Indre-et-Loire', '24'), ('38', 'Isère', '82'), ('39', 'Jura', '43'), ('40', 'Landes', '72'), ('41', 'Loir-et-Cher', '24'), ('42', 'Loire', '82'), ('43', 'Haute-Loire', '83'), ('44', 'Loire-Atlantique', '52'), ('45', 'Loiret', '24'), ('46', 'Lot', '73'), ('47', 'Lot-et-Garonne', '72'), ('48', 'Lozère', '91'), ('49', 'Maine-et-Loire', '52'), ('50', 'Manche', '25'), ('51', 'Marne', '21'), ('52', 'Haute-Marne', '21'), ('53', 'Mayenne', '52'), ('54', 'Meurthe-et-Moselle', '41'), ('55', 'Meuse', '41'), ('56', 'Morbihan', '53'), ('57', 'Moselle', '41'), ('58', 'Nièvre', '26'), ('59', 'Nord', '31'), ('60', 'Oise', '22'), ('61', 'Orne', '25'), ('62', 'Pas-de-Calais', '31'), ('63', 'Puy-de-Dôme', '83'), ('64', 'Pyrénées-Atlantiques', '72'), ('65', 'Hautes-Pyrénées', '73'), ('66', 'Pyrénées-Orientales', '91'), ('67', 'Bas-Rhin', '42'), ('68', 'Haut-Rhin', '42'), ('69', 'Rhône', '82'), ('70', 'Haute-Saône', '43'), ('71', 'Saône-et-Loire', '26'), ('72', 'Sarthe', '52'), ('73', 'Savoie', '82'), ('74', 'Haute-Savoie', '82'), ('75', 'Paris', '11'), ('76', 'Seine-Maritime', '23'), ('77', 'Seine-et-Marne', '11'), ('78', 'Yvelines', '11'), ('79', 'Deux-Sèvres', '54'), ('80', 'Somme', '22'), ('81', 'Tarn', '73'), ('82', 'Tarn-et-Garonne', '73'), ('83', 'Var', '93'), ('84', 'Vaucluse', '93'), ('85', 'Vendée', '52'), ('86', 'Vienne', '54'), ('87', 'Haute-Vienne', '74'), ('88', 'Vosges', '41'), ('89', 'Yonne', '26'), ('90', 'Territoire de Belfort', '43'), ('91', 'Essonne', '11'), ('92', 'Hauts-de-Seine', '11'), ('93', 'Seine-Saint-Denis', '11'), ('94', 'Val-de-Marne', '11'), ('95', "Val-d'Oise", '11'), ('971', 'Guadeloupe', '01'), ('972', 'Martinique', '02'), ('973', 'Guyane', '03'), ('974', 'La Réunion', '04'), ('975', 'Saint-Pierre-et-Miquelon', None), ('976', 'Mayotte', '05'), ('977', 'Saint-Barthélemy', None), ('978', 'Saint-Martin', None), ('984', 'Terres australes et antarctiques françaises', None), ('986', 'Wallis et Futuna', None), ('987', 'Polynésie française', None), ('988', 'Nouvelle-Calédonie', None), ('989', 'Île de Clipperton', None))

See the “Code officiel géographique” on the INSEE website <www.insee.fr>.

localflavor.fr.fr_department.DEPARTMENT_CHOICES = (('01', '01 - Ain'), ('02', '02 - Aisne'), ('03', '03 - Allier'), ('04', '04 - Alpes-de-Haute-Provence'), ('05', '05 - Hautes-Alpes'), ('06', '06 - Alpes-Maritimes'), ('07', '07 - Ardèche'), ('08', '08 - Ardennes'), ('09', '09 - Ariège'), ('10', '10 - Aube'), ('11', '11 - Aude'), ('12', '12 - Aveyron'), ('13', '13 - Bouches-du-Rhône'), ('14', '14 - Calvados'), ('15', '15 - Cantal'), ('16', '16 - Charente'), ('17', '17 - Charente-Maritime'), ('18', '18 - Cher'), ('19', '19 - Corrèze'), ('2A', '2A - Corse-du-Sud'), ('2B', '2B - Haute-Corse'), ('21', "21 - Côte-d'Or"), ('22', "22 - Côtes-d'Armor"), ('23', '23 - Creuse'), ('24', '24 - Dordogne'), ('25', '25 - Doubs'), ('26', '26 - Drôme'), ('27', '27 - Eure'), ('28', '28 - Eure-et-Loir'), ('29', '29 - Finistère'), ('30', '30 - Gard'), ('31', '31 - Haute-Garonne'), ('32', '32 - Gers'), ('33', '33 - Gironde'), ('34', '34 - Hérault'), ('35', '35 - Ille-et-Vilaine'), ('36', '36 - Indre'), ('37', '37 - Indre-et-Loire'), ('38', '38 - Isère'), ('39', '39 - Jura'), ('40', '40 - Landes'), ('41', '41 - Loir-et-Cher'), ('42', '42 - Loire'), ('43', '43 - Haute-Loire'), ('44', '44 - Loire-Atlantique'), ('45', '45 - Loiret'), ('46', '46 - Lot'), ('47', '47 - Lot-et-Garonne'), ('48', '48 - Lozère'), ('49', '49 - Maine-et-Loire'), ('50', '50 - Manche'), ('51', '51 - Marne'), ('52', '52 - Haute-Marne'), ('53', '53 - Mayenne'), ('54', '54 - Meurthe-et-Moselle'), ('55', '55 - Meuse'), ('56', '56 - Morbihan'), ('57', '57 - Moselle'), ('58', '58 - Nièvre'), ('59', '59 - Nord'), ('60', '60 - Oise'), ('61', '61 - Orne'), ('62', '62 - Pas-de-Calais'), ('63', '63 - Puy-de-Dôme'), ('64', '64 - Pyrénées-Atlantiques'), ('65', '65 - Hautes-Pyrénées'), ('66', '66 - Pyrénées-Orientales'), ('67', '67 - Bas-Rhin'), ('68', '68 - Haut-Rhin'), ('69', '69 - Rhône'), ('70', '70 - Haute-Saône'), ('71', '71 - Saône-et-Loire'), ('72', '72 - Sarthe'), ('73', '73 - Savoie'), ('74', '74 - Haute-Savoie'), ('75', '75 - Paris'), ('76', '76 - Seine-Maritime'), ('77', '77 - Seine-et-Marne'), ('78', '78 - Yvelines'), ('79', '79 - Deux-Sèvres'), ('80', '80 - Somme'), ('81', '81 - Tarn'), ('82', '82 - Tarn-et-Garonne'), ('83', '83 - Var'), ('84', '84 - Vaucluse'), ('85', '85 - Vendée'), ('86', '86 - Vienne'), ('87', '87 - Haute-Vienne'), ('88', '88 - Vosges'), ('89', '89 - Yonne'), ('90', '90 - Territoire de Belfort'), ('91', '91 - Essonne'), ('92', '92 - Hauts-de-Seine'), ('93', '93 - Seine-Saint-Denis'), ('94', '94 - Val-de-Marne'), ('95', "95 - Val-d'Oise"), ('971', '971 - Guadeloupe'), ('972', '972 - Martinique'), ('973', '973 - Guyane'), ('974', '974 - La Réunion'), ('975', '975 - Saint-Pierre-et-Miquelon'), ('976', '976 - Mayotte'), ('977', '977 - Saint-Barthélemy'), ('978', '978 - Saint-Martin'), ('984', '984 - Terres australes et antarctiques françaises'), ('986', '986 - Wallis et Futuna'), ('987', '987 - Polynésie française'), ('988', '988 - Nouvelle-Calédonie'), ('989', '989 - Île de Clipperton'))

A list of departments

localflavor.fr.fr_region.REGION_CHOICES = (('01', 'Guadeloupe'), ('02', 'Martinique'), ('03', 'Guyane'), ('04', 'La Réunion'), ('05', 'Mayotte'), ('11', 'Île-de-France'), ('21', 'Champagne-Ardenne'), ('22', 'Picardie'), ('23', 'Haute-Normandie'), ('24', 'Centre'), ('25', 'Basse-Normandie'), ('26', 'Bourgogne'), ('31', 'Nord-Pas-de-Calais'), ('41', 'Lorraine'), ('42', 'Alsace'), ('43', 'Franche-Comté'), ('52', 'Pays de la Loire'), ('53', 'Bretagne'), ('54', 'Poitou-Charentes'), ('72', 'Aquitaine'), ('73', 'Midi-Pyrénées'), ('74', 'Limousin'), ('82', 'Rhône-Alpes'), ('83', 'Auvergne'), ('91', 'Languedoc-Roussillon'), ('93', "Provence-Alpes-Côte d'Azur"), ('94', 'Corse'))

See the “Code officiel géographique” on the INSEE website <www.insee.fr>.

localflavor.fr.fr_region.REGION_2016_CHOICES = (('01', 'Guadeloupe'), ('02', 'Martinique'), ('03', 'Guyane'), ('04', 'La Réunion'), ('06', 'Mayotte'), ('11', 'Île-de-France'), ('24', 'Centre-Val de Loire'), ('27', 'Bourgogne-Franche-Comté'), ('28', 'Normandie'), ('32', 'Hauts-de-France'), ('44', 'Grand Est'), ('52', 'Pays de la Loire'), ('53', 'Bretagne'), ('75', 'Nouvelle-Aquitaine'), ('76', 'Occitanie'), ('84', 'Auvergne-Rhône-Alpes'), ('93', "Provence-Alpes-Côte d'Azur"), ('94', 'Corse'))

France changed its regions in 2016, see: