Skip to content

Instantly share code, notes, and snippets.

View mapperfr's full-sized avatar

Jérémy Garniaux mapperfr

View GitHub Profile
@mapperfr
mapperfr / departements_france_django.py
Last active October 9, 2023 23:47
List of departements of France to be used in Django as models.TextChoices (followed by a basic example of a field calling it)
class Departement(models.TextChoices):
AIN = 'Ain', _('Ain')
AISNE = 'Aisne', _('Aisne')
ALLIER = 'Allier', _('Allier')
ALPES_DE_HAUTE_PROVENCE = 'Alpes-de-Haute-Provence', _('Alpes-de-Haute-Provence')
HAUTES_ALPES = 'Hautes-Alpes', _('Hautes-Alpes')
ALPES_MARITIMES = 'Alpes-Maritimes', _('Alpes-Maritimes')
ARDÈCHE = 'Ardèche', _('Ardèche')
ARDENNES = 'Ardennes', _('Ardennes')
ARIEGE = 'Ariège', _('Ariège')