Latvia (lv)

New in version 1.1.

Forms

class localflavor.lv.forms.LVMunicipalitySelect(attrs=None)[source]

A select field of Latvian municipalities.

class localflavor.lv.forms.LVPersonalCodeField(required=True, widget=None, label=None, initial=None, help_text='', error_messages=None, show_hidden_initial=False, validators=(), localize=False, disabled=False, label_suffix=None)[source]

A form field that validates input as a Latvian personal code.

static lv_checksum(value)[source]

Takes a string of 10 digits as input, returns check digit.

class localflavor.lv.forms.LVPostalCodeField(required=True, widget=None, label=None, initial=None, help_text='', error_messages=None, show_hidden_initial=False, validators=(), localize=False, disabled=False, label_suffix=None)[source]

A form field that validates and normalizes Latvian postal codes.

Latvian postal codes in following forms accepted:
  • XXXX
  • LV-XXXX

Data

localflavor.lv.lv_choices.MUNICIPALITY_CHOICES = (('DGV', 'Daugavpils'), ('JEL', 'Jelgava'), ('JKB', 'Jēkabpils'), ('JUR', 'Jūrmala'), ('LPX', 'Liepāja'), ('REZ', 'Rēzekne'), ('RIX', 'Riga'), ('VMR', 'Valmiera'), ('VEN', 'Ventspils'), ('001', 'Aglona municipality'), ('002', 'Aizkraukle municipality'), ('003', 'Aizpute municipality'), ('004', 'Aknīste municipality'), ('005', 'Aloja municipality'), ('006', 'Alsunga municipality'), ('007', 'Alūksne municipality'), ('008', 'Amata municipality'), ('009', 'Ape municipality'), ('010', 'Auce municipality'), ('011', 'Ādaži municipality'), ('012', 'Babīte municipality'), ('013', 'Baldone municipality'), ('014', 'Baltinava municipality'), ('015', 'Balvi municipality'), ('016', 'Bauska municipality'), ('017', 'Beverīna municipality'), ('018', 'Brocēni municipality'), ('019', 'Burtnieki municipality'), ('020', 'Carnikava municipality'), ('021', 'Cesvaine municipality'), ('022', 'Cēsis municipality'), ('023', 'Cibla municipality'), ('024', 'Dagda municipality'), ('025', 'Daugavpils municipality'), ('026', 'Dobele municipality'), ('027', 'Dundaga municipality'), ('028', 'Durbe municipality'), ('029', 'Engure municipality'), ('030', 'Ērgļi municipality'), ('031', 'Garkalne municipality'), ('032', 'Grobiņa municipality'), ('033', 'Gulbene municipality'), ('034', 'Iecava municipality'), ('035', 'Ikšķile municipality'), ('036', 'Ilūkste municipality'), ('037', 'Inčukalns municipality'), ('038', 'Jaunjelgava municipality'), ('039', 'Jaunpiebalga municipality'), ('040', 'Jaunpils municipality'), ('041', 'Jelgava municipality'), ('042', 'Jēkabpils municipality'), ('043', 'Kandava municipality'), ('044', 'Kārsava municipality'), ('045', 'Kocēni municipality'), ('046', 'Koknese municipality'), ('047', 'Krāslava municipality'), ('048', 'Krimulda municipality'), ('049', 'Krustpils municipality'), ('050', 'Kuldīga municipality'), ('051', 'Ķegums municipality'), ('052', 'Ķekava municipality'), ('053', 'Lielvārde municipality'), ('054', 'Limbaži municipality'), ('055', 'Līgatne municipality'), ('056', 'Līvāni municipality'), ('057', 'Lubāna municipality'), ('058', 'Ludza municipality'), ('059', 'Madona municipality'), ('060', 'Mazsalaca municipality'), ('061', 'Mālpils municipality'), ('062', 'Mārupe municipality'), ('063', 'Mērsrags municipality'), ('064', 'Naukšēni municipality'), ('065', 'Nereta municipality'), ('066', 'Nīca municipality'), ('067', 'Ogre municipality'), ('068', 'Olaine municipality'), ('069', 'Ozolnieki municipality'), ('070', 'Pārgauja municipality'), ('071', 'Pāvilosta municipality'), ('072', 'Pļaviņas municipality'), ('073', 'Preiļi municipality'), ('074', 'Priekule municipality'), ('075', 'Priekuļi municipality'), ('076', 'Rauna municipality'), ('077', 'Rēzekne municipality'), ('078', 'Riebiņi municipality'), ('079', 'Roja municipality'), ('080', 'Ropaži municipality'), ('081', 'Rucava municipality'), ('082', 'Rugāji municipality'), ('083', 'Rundāle municipality'), ('084', 'Rūjiena municipality'), ('085', 'Sala municipality'), ('086', 'Salacgrīva municipality'), ('087', 'Salaspils municipality'), ('088', 'Saldus municipality'), ('089', 'Saulkrasti municipality'), ('090', 'Sēja municipality'), ('091', 'Sigulda municipality'), ('092', 'Skrīveri municipality'), ('093', 'Skrunda municipality'), ('094', 'Smiltene municipality'), ('095', 'Stopiņi municipality'), ('096', 'Strenči municipality'), ('097', 'Talsi municipality'), ('098', 'Tērvete municipality'), ('099', 'Tukums municipality'), ('100', 'Vaiņode municipality'), ('101', 'Valka municipality'), ('102', 'Varakļāni municipality'), ('103', 'Vārkava municipality'), ('104', 'Vecpiebalga municipality'), ('105', 'Vecumnieki municipality'), ('106', 'Ventspils municipality'), ('107', 'Viesīte municipality'), ('108', 'Viļaka municipality'), ('109', 'Viļāni municipality'), ('110', 'Zilupe municipality'))

A list of Latvian municipalities and republican cities. Identifiers based on ISO 3166-2:LV. https://en.wikipedia.org/wiki/ISO_3166-2:LV