Lithuania (lt)

Forms

class localflavor.lt.forms.LTCountySelect(attrs=None)[source]

A select field with the Lithuanian counties as choices

class localflavor.lt.forms.LTIDCodeField(*args, **kwargs)[source]

A form field that validates as Lithuanian ID Code.

Checks:
  • Made of exactly 11 decimal numbers.
  • Checksum is correct.
  • ID contains valid date.
clean(value)[source]

Validate the given value and return its “cleaned” value as an appropriate Python object. Raise ValidationError for any errors.

valid_date(value)[source]

Check if date in ID code is valid.

We won’t check for dates in future as it would become too restrictive.

class localflavor.lt.forms.LTMunicipalitySelect(attrs=None)[source]

A select field with the Lithuanian municipalities as choices

class localflavor.lt.forms.LTPostalCodeField(*, 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 Lithanuan postal codes.

Lithuanian postal codes in following forms accepted:
  • XXXXX
  • LT-XXXXX
clean(value)[source]

Validate the given value and return its “cleaned” value as an appropriate Python object. Raise ValidationError for any errors.

Data

localflavor.lt.lt_choices.COUNTY_CHOICES = (('alytus', 'Alytus'), ('kaunas', 'Kaunas'), ('klaipeda', 'Klaipėda'), ('mariampole', 'Mariampolė'), ('panevezys', 'Panevėžys'), ('siauliai', 'Šiauliai'), ('taurage', 'Tauragė'), ('telsiai', 'Telšiai'), ('utena', 'Utena'), ('vilnius', 'Vilnius'))

Alphabetically sorted list of Lithuanian counties.

localflavor.lt.lt_choices.MUNICIPALITY_CHOICES = (('akmene', 'Akmenė district'), ('alytus_c', 'Alytus city'), ('alytus', 'Alytus district'), ('anyksciai', 'Anykščiai district'), ('birstonas', 'Birštonas'), ('birzai', 'Biržai district'), ('druskininkai', 'Druskininkai'), ('elektrenai', 'Elektrėnai'), ('ignalina', 'Ignalina district'), ('jonava', 'Jonava district'), ('joniskis', 'Joniškis district'), ('jurbarkas', 'Jurbarkas district'), ('kaisiadorys', 'Kaišiadorys district'), ('kalvarija', 'Kalvarija'), ('kaunas_c', 'Kaunas city'), ('kaunas', 'Kaunas district'), ('kazluruda', 'Kazlų Rūda'), ('kedainiai', 'Kėdainiai district'), ('kelme', 'Kelmė district'), ('klaipeda_c', 'Klaipėda city'), ('klaipeda', 'Klaipėda district'), ('kretinga', 'Kretinga district'), ('kupiskis', 'Kupiškis district'), ('lazdijai', 'Lazdijai district'), ('marijampole', 'Marijampolė'), ('mazeikiai', 'Mažeikiai district'), ('moletai', 'Molėtai district'), ('neringa', 'Neringa'), ('pagegiai', 'Pagėgiai'), ('pakruojis', 'Pakruojis district'), ('palanga', 'Palanga city'), ('panevezys_c', 'Panevėžys city'), ('panevezys', 'Panevėžys district'), ('pasvalys', 'Pasvalys district'), ('plunge', 'Plungė district'), ('prienai', 'Prienai district'), ('radviliskis', 'Radviliškis district'), ('raseiniai', 'Raseiniai district'), ('rietavas', 'Rietavas'), ('rokiskis', 'Rokiškis district'), ('skuodas', 'Skuodas district'), ('sakiai', 'Šakiai district'), ('salcininkai', 'Šalčininkai district'), ('siauliai_c', 'Šiauliai city'), ('siauliai', 'Šiauliai district'), ('silale', 'Šilalė district'), ('silute', 'Šilutė district'), ('sirvintos', 'Širvintos district'), ('svencionys', 'Švenčionys district'), ('taurage', 'Tauragė district'), ('telsiai', 'Telšiai district'), ('trakai', 'Trakai district'), ('ukmerge', 'Ukmergė district'), ('utena', 'Utena district'), ('varena', 'Varėna district'), ('vilkaviskis', 'Vilkaviškis district'), ('vilnius_c', 'Vilnius city'), ('vilnius', 'Vilnius district'), ('visaginas', 'Visaginas'), ('zarasai', 'Zarasai district'))

Alphabetically sorted lists of Lithuanian municipalities.