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.
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.LTPhoneField(mobile=True, landline=True, emergency=False, landline_local=False, service=False, **kwargs)[source]

Form field that validates as Lithuanian phone number.

You can accept any permutation of following phone numbers:

  • Emergency (01, 02, 03, 04, 112)
  • Mobile (370 600 00 000)
  • Landline
  • Service numbers

If you accept landline numbers, you can opt in to accepting local landline numbers too. Local landline numbers are numbers without area code.

This field does not accept multiple numbers (as separated by /).

The field tries its best to convert the number into one you can call to internationally. Currently emergency and most of landline_local numbers are not converted.

New in version 1.1.

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

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

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.